Exercise
所属分类:网络编程
开发工具:Visual C++
文件大小:1536KB
下载次数:64
上传日期:2009-08-23 10:08:49
上 传 者:
lm365cn
说明: 无线网络仿真工具qualNet的几个应用实例,很有学习价值
(QualNet example)
文件列表:
Exercise\Chapter 5 Link Layer and Local Area Networks.htm (16903, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\basic.css (2634, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\degasnew.jpg (24919, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_analyzebutton.jpg (3487, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_analyzer.jpg (41955, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_animationfilter.jpg (18967, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_BW.jpg (47972, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_links.jpg (23446, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_menubar.jpg (9674, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_new_scen0.jpg (13669, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_new_scen1.jpg (17312, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_new_scen2.jpg (28366, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_nodes.jpg (21144, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_routes.jpg (30366, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_routfile_big.jpg (30547, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_run1.jpg (40101, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_run2.jpg (38745, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_runbutton.jpg (3359, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_statfile.jpg (41646, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_top.gif (8140, 2007-12-20)
Exercise\Chapter 1 Computer Networks and the Internet.files\exp1_traffic.jpg (32322, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\basic.css (2634, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\degasnew.jpg (24919, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_analyzer.jpg (44132, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_aodv.jpg (49602, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_autoplacenode1.jpg (12139, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_autoplacenode2.jpg (12963, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_autoplacenode3.jpg (11834, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_http2.jpg (37989, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_http_attribute.jpg (38751, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_http_canvas.jpg (1703, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_nodes.jpg (17668, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_placenode_menu.jpg (12914, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_run1.jpg (40677, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_sha_0.jpg (27556, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_sha_1.jpg (12405, 2007-12-20)
Exercise\Chapter 2 Application Layer.files\exp2_simutime.jpg (41250, 2007-12-20)
Exercise\Chapter 3 Transport Layer.files\basic.css (2634, 2007-12-20)
Exercise\Chapter 3 Transport Layer.files\cwnd_tahoe.jpg (41870, 2007-12-20)
Exercise\Chapter 3 Transport Layer.files\degasnew.jpg (24919, 2007-12-20)
... ...
Adding SRIP into QualNet
2007/10
========================
Note: All directories referred in these instructions are relative to $QUALNET_HOME.
1. Copy source files (routing_srip.h and routing_srip.cpp) into the directory
libraries/developer/src/
cp routing_srip.cpp routing_srip.h $QUALNET_HOME/libraries/developer/src/
2. Modify the file include/network.h to let QualNet know about the new network
layer protocol by adding:
ROUTING_PROTOCOL_SRIP
to the end of list of NetworkRoutingProtocolType enum.
Also put a comma (,) at the end of the line before the
insertion point if it is not already there.
3. Modify the file libraries/developer/src/network_ip.h to let IP layer know
about the new IP protocol by adding:
#define IPPROTO_SRIP 211
after the line '//InsertPatch ROUTING_IPPROTO'.
Be sure to use an IP protocol number (e.g., 211) that is not already used
by other protocols.
4. Hook all the SRIP functions into QualNet at the IP layer by modifying the
file libraries/developer/src/network_ip.cpp as follows:
- After the line '//InsertPatch HEADER_FILES,' add:
#include "routing_srip.h"
- After the line '//InsertPatch NETWORK_INIT_CODE' located inside the
function NetworkIpInit(), add:
else
if (strcmp(protocolString, "SRIP") == 0)
{
NetworkIpAddUnicastRoutingProtocolType(
node,
ROUTING_PROTOCOL_SRIP,
i);
if (!NetworkIpGetRoutingProtocol(node, ROUTING_PROTOCOL_SRIP))
{
SripInit(
node,
(SripData **) &ip->interfaceInfo[i]->routingProtocol,
nodeInput,
i);
}
else
{
NetworkIpUpdateUnicastRoutingProtocolAndRouterFunction(
node,
ROUTING_PROTOCOL_SRIP,
i);
}
}
- After the line '//InsertPatch NETWORK_IP_LAYER' located inside the
function NetworkIpLayer(), add:
case ROUTING_PROTOCOL_SRIP:
{
SripHandleProtocolEvent(node, msg);
break;
}
- After the line '//InsertPatch FINALIZE_FUNCTION' located inside the
function NetworkIpFinalize(), add:
case ROUTING_PROTOCOL_SRIP:
{
SripFinalize(node);
break;
}
- After the line '//InsertPatch NETWORK_HANDLE_PACKET' located inside the
function DeliverPacket(), add:
case IPPROTO_SRIP:
{
SripHandleProtocolPacket(
node,
msg,
sourceAddress);
break;
}
5. Tell QualNet to incorporate SRIP code into the simulation by editing
libraries/developer/Makefile-common
- Insert the line
$(DEVELOPER_SRCDIR)/routing_srip.cpp \
in the proper position of the alphabetically ordered list of
"DEVELOPER_SRCS = \".
Also put a backslash (\) at the end of the line before the
insertion point if it is not already there.
6. Rebuild the .h dependencies by running 'make depend' from main/:
cd $QUALNET_HOME/main
make depend
7. Rebuild QualNet executable:
make
8. Create a new main configuration file for SRIP by copying default.config into
srip.config in bin/ directory, and modify the following two parameters:
EXPERIMENT-NAME srip
ROUTING-PROTOCOL SRIP
Also add one more parameter for SRIP itself
SRIP-UPDATE-INTERVAL 10S
If you're already provided with srip.config and/or srip.app, just copy them
into the bin/ directory
9. Test the protocol on the configuration file:
cd $QUALNET_HOME/bin
./qualnet srip.config
近期下载者:
相关文件:
收藏者: