Dear all, How to allocate GTS in NS2 ? what it's has already supported by GTS
Regard Eppy Yundra Pada Senin, 28 April 2014 8:04, "ns-users-requ...@isi.edu" <ns-users-requ...@isi.edu> menulis: Send Ns-users mailing list submissions to ns-users@isi.edu To subscribe or unsubscribe via the World Wide Web, visit http://mailman.isi.edu/mailman/listinfo/ns-users or, via email, send a message with subject or body 'help' to ns-users-requ...@isi.edu You can reach the person managing the list at ns-users-ow...@isi.edu When replying, please edit your Subject line so it is more specific than "Re: Contents of Ns-users digest..." Today's Topics: 1. how to set packet type? (=?big5?B?qkwgrfWlsA==?=) ---------------------------------------------------------------------- Message: 1 Date: Sun, 27 Apr 2014 08:37:17 +0000 From: =?big5?B?qkwgrfWlsA==?= <ms951...@hotmail.com.tw> Subject: [ns] how to set packet type? To: "ns-users@isi.edu" <ns-users@isi.edu> Message-ID: <blu182-w398c74f807a297c5e148b8f1...@phx.gbl> Content-Type: text/plain; charset="big5" Dear all, I'm writing a new Agent and use exponential traffic generator to generate traffic. In my Agent , I override sendmsg() like following code void AgentCPU::sendmsg(int nbytes,const char* flag){ Packet pkt*=allocpkt(); hdr_cmn ch*=hdr_cmn::access(pkt); hdr_task task*=hdr_task::access(pkt); // my new packet header hdr_ip ip*=hdr_ip::access(pkt); ch->ptype()=PT_TASK; ch->size()=size_; ...} But when I see the trace files , the packet size and type are not same to my setting. So, I used the printf to help me debug. void AgentCPU::sendmsg(int nbytes,const char* flag){ Packet pkt*=allocpkt(); hdr_cmn ch*=hdr_cmn::access(pkt); hdr_task task*=hdr_task::access(pkt); // my new packet header hdr_ip ip*=hdr_ip::access(pkt); ch->ptype()=PT_TASK; ch->size()=size_; printf("packet type is %s\n",ch->ptype()); printf("packet size is %d\n",ch->size()); ...} And what make me more confuesd is the message showed like packet type is null packet size is 1070596096 (my setting is 100) And I'm sured I have modfied the packet.h like following code ...static const packet_t PT_TASK=73;......name_[PT_TASK]="task";... My Question is Why I cant set packet type , is anything I did wrong? Or there is more files I should modify to surrport this sendmsg function? Any suggestion will be very thanksful!! ------------------------------ _______________________________________________ Ns-users mailing list Ns-users@isi.edu http://mailman.isi.edu/mailman/listinfo/ns-users End of Ns-users Digest, Vol 124, Issue 20 *****************************************