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

Re: [ns] udp header size missing ?



On Wed, 15 Aug 2001, Neundorf Alexander wrote:

> I had a look at UdpAgent::sendmsg(), I couldn't find the line
> where the size of the UDP header (8 byte) is added to
> hdr_common.size. Is this a bug ? Is this intentionally ? Why ?

Header sizes in ns are a bit of a fudge; I like to think that this
comes from originally focusing on algorithms to generate packets (comp
sci) rather than size of packets and hard numbers (eng). So you won't
find 20 explicitly added for IP or TCP in the wired ns code either...

packetSize_ often means transport segment size as well in wired ns. If
your packets are large enough, the difference shrinks to
not-that-important, unless you're an engineer with this thing for Hard
Numbers.

Wireless ns tends to take some notice of header overhead at various
layers and adds and subtracts bits and pieces here and there, but it's
not a complete solution; getting the addition/subtraction wrong is an
easy way to break FullTcp, which checks packet size during connection
setup.

Ideally, I think you'd have some per-packet struct/array/list stacking
and popping header overhead at every layer... adds simulation
overhead, though.

(see my archived rants ad nauseum on this. Saw Sally at IETF
 London; she tells me doing something about header overheads is on her
 to-do list.)

L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>