Hi, I understand your point. I would really appreciate if you could elaborate more and direct me to the exact structure location in the code from whre we compute the packet size for -e option. I tried to look in the code but can't really pinpoint the structure from which it computes the packet size.
Another thing I noticed was the incorrect hdr_cmn size being reported. I checked the sizeof (hdr_cmn) and it reported the size as 96 bytes. But if you go to the hdr_cmn structure, you will find that it's size should be much bigger than 96 bytes because of obvious reasons. Any comments are appreciated. Thanks, - Faisal On 4/26/06, Ilyes Gouta <[EMAIL PROTECTED]> wrote: > > > Hi, > > 210 bytes is the total size of the packet. This includes the size of > all the headers (RTP/UDP/IP/...) + the size of the payload. You'll > have to use the protocol's access methods to query for the real size > of the payload. However if you're simulating CBR stuff over RTP then > all your calculations would be simplified since the payload size is > likely to be constant through the time (think of an MP3 frame or an > MPEG TS packet, etc.). > > Regards, > Ilyes Gouta. > > On 4/25/06, Faisal Siddiqui <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am a bit confused with the -e option in the NAM trace file. I believe > it > > means the size of the packet. The wording "size of the packet" is > throwing > > me off. Does it means the size of the packet header that we are using in > our > > script or is it something else. For instance, when I simulate my script > with > > the RTP agents, it tells me the size of the rtp packet header is 210 > bytes. > > But when I look in the code and count the number of bytes that the > packet > > reserves, it is as follows: > > > > ######################## > > struct hdr_rtp { > > u_int32_t srcid_; // 4 bytes > > int seqno_; // 4 bytes > > u_int16_t flags_; // 2 bytes > > static int offset_; // 4 bytes > > inline static int& offset() {} // 4 bytes > > inline static hdr_rtp* access() {} // 4 bytes > > u_int32_t& srcid() {} // 4 bytes > > int& seqno() {} // 4 bytes > > u_int16_t& flags() {} // 4 bytes > > }; > > ######################## > > > > So from here, the size of the RTP packet header is only 34 bytes. > > > > Why does in the trace file with -e option, we get the size of the packet > as > > 210 bytes? > > > > Any help is highly appreciated. > > > > Thanks, > > - Faisal > > > >