Retrieving Multicast Packet Contents
Posted on 2006-10-20
I have a question concerning the retrieval of a multicast packet's contents. I need to translate the network packets that I have
been getting via multicast protocol. Each packet has a binary representation of the message header and includes the payload
in compressed RLC format. Its structure is as follows:
sequence number - four bytes (binary)
timestamp - four bytes (binary)
message body length - two bytes (binary)
message - RLC -compressed
Knowing this structure and that my packet is received as follows
recvStringLen = recvfrom(sock, recvString, MAXRECVSTRING, 0, NULL, 0)
How do I obtain the header and body contents? I believe the RLC compression is thru
zlib. How do I go about uncompressing the payload?
I am writing the program in C using Microsoft Visual C++.