[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ns] packet headers!



What do you mean by the size of 'application layer'? If you mean the size
of all packet header plus data size, then this number is set by
Agent::allocpkt() (through initpkt()). If you notice there is a bounded
variable size_, that's how derived agents tell allocpkt() what to set
customized values of packet size. Of course, derived agents may also 
choose to set packet size themselves after the packet is allocated, which
can be simply done by doing a 'hdr_cmn::access(p)->size() = <size>;' after
the packet is allocated.

- Haobo

On Sun, 27 Aug 2000, Sowmya Manjanatha wrote:

> The NS manual indicates that
> 
> hdr_cmn::access(packet)->size_ 
> 
> is the size of the (Application + IP + TCP) layer.  In "allocpkt"
> function, I couldn't see the size of the Application header being
> initialized unless this is what the "hdr_rtp" structure is doing.
> 
> 1. Can anyone tell me which is the function that initializes the size
>    of the Application layer?
> 
> 2. Also, what is the link layer used in NS by default ?  Or, in a simple
>    script such as the one provided in Marc Greiss's tutorial, is a link
>    layer header simulated as part of the packet at all?
> 
> Any pointers or suggestions would be very helpful.
> 
> Thanks,
> Sowmya.
> 
> 
> 
> 
> *******************************************************************************
> 
>     Sowmya Manjanatha : University of New Hampshire
>     Major             : Computer Science      
>     *********************************************** 
> 
>     email        : [email protected]
> 
>     Call me at   : (978)-689-8860 (res)
>                    (603)-862-4626 (unh)
> 
> *******************************************************************************
>