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

variable size packet headers, and packet types ...



Hi folks - I'm wondering if there's anyone who ever needed variable size
packet headers (in my case, there are options which may or may not be
present). The two ways that I can see to do this (given that the header
size is compiled in) are (1) include any options as part of the packet
data and adjust packet size when sending (2) include the extra space in
the fixed-size header and have it go unused most of the time. Option 1
seems better to me, but I'm wondering if there are other ways.

Also, is it better to have just one packet type (PT_***) for a protocol,
and differentiate between the different protocol packet types with a tag,
as opposed to several packet types (I ask because the ns implementation of
SRM uses only one kind of packet, with a type field)? A tag will be
required even if there are different packet types, because they'll all be
processed by the same recv() function in the agent. 

Thanx,
Chetan Rai.