[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Network packet data structure.
I have recently written a program to create packets, fill them
with data, transmit them on my own network and then decode the
information at the destination machine.
Packets have a header section which is a structure with about
7-9 components and an array portion (termed a sub-packet).
The sub-packet is an array with 1942 elements (of type art-8b
or art-16b, not art-string)
The question I have is regarding the way TCP and Chaos store the
information into the packet.
When Chaos defines the packet structure it adds a slot called
'string' to the leader which it defines as an 'art-string.
Chaos appears to place all the data into this slot with a
string-nconc, leaving the array portion of the packet almost
completely empty.
TCP, on the other hand, loops through the message being transmitted,
converting each character to ascii then storing this value into
successive elements of the array. Then, at the destination,
the :receive-packet method must loop through the array and convert
each element back into the appropriate character.
While the TCP method appears more elegant, it is also more work
than necesary if the Chaos packet structure is sound. Does
anyone out there know if this is actually what happens and if there
is a reason for this difference. Also, is there anyone with
experience in packets who can advise me on which method to use, or,
the advantages and disadvantages of either approach.
If anyone else indicates interest I'll summarize responses and
post them back.
----
Thanks in advance,
Vic Shubin Voice: (408)289-3947
FMC Fax: (408)289-2732
I'net: shubin@ctc.fmc.com