1.下载mUDP, mUdpSink的文件,要下载的有下列几个文件:
mudp.cc、mudp.h、mudpsink.cc、mudpsink.h
http://www.pudn.com/Download/item/id/3280230.html
2.新建/ns-allinone-2.33/ns-2.33/measure文件夹,把这四个文件放入其中。
3.修改/ns-allinone-2.33/ns-2.33/common/packet.h,把如下程序加入struct hdr_cmn{}中。
int frametype_; //added by smallko
double sendtime_; // added by smallko
unsigned int pkt_id_; // added by smallko
unsigned int frame_pkt_id_; //added by smallko
4.修改/ns-allinone-2.33/ns-2.33/Makefile,把如下程序加入OBJ_CC下一行。
measure/mudp.o measure/mudpsink.o \
5.修改/ns-allinone-2.33/ns-2.33/tcl/lib/ns-default.tcl,把如下程序加入Agent/Ping set packetSize_ 64下一行。
Agent/mUDP set packetSize_ 1000
6.用cygwin 的dos窗口在/ns-allinone-2.33/ns-2.33目录下执行./cofigure;make clean,make命令,就OK了。
mudp.cc、mudp.h、mudpsink.cc、mudpsink.h
http://www.pudn.com/Download/item/id/3280230.html
2.新建/ns-allinone-2.33/ns-2.33/measure文件夹,把这四个文件放入其中。
3.修改/ns-allinone-2.33/ns-2.33/common/packet.h,把如下程序加入struct hdr_cmn{}中。
int frametype_; //added by smallko
double sendtime_; // added by smallko
unsigned int pkt_id_; // added by smallko
unsigned int frame_pkt_id_; //added by smallko
4.修改/ns-allinone-2.33/ns-2.33/Makefile,把如下程序加入OBJ_CC下一行。
measure/mudp.o measure/mudpsink.o \
5.修改/ns-allinone-2.33/ns-2.33/tcl/lib/ns-default.tcl,把如下程序加入Agent/Ping set packetSize_ 64下一行。
Agent/mUDP set packetSize_ 1000
6.用cygwin 的dos窗口在/ns-allinone-2.33/ns-2.33目录下执行./cofigure;make clean,make命令,就OK了。