Im planning to deploy a version for some IETF drafts and need some code references or guidance. Im familiar with basic TCP sockets but want to know how to translate requirements into code.
Example: Format for the Session Initiation Protocol (SIP) Common Log Format (CLF)
Would like to see how to translate:
0 7 8 15 16 23 24 31
+-----------+-----------+-----------+-----------+
| Version | Record Length | 0 - 3
+-----------+-----------+-----------+-----------+
Version (1 byte): 0x41 for this document; hexadecimal encoded.
Record Length (6 bytes): Hexadecimal encoded total length of this
log record, including "Flags" and "Record Length" fields, and
terminating line-feed.
into code. How can I define Version? Which type? Int, char, etc?
Thanks
Record Length (6 bytes)
but in the diagram it looks like 24bits(3bytes) – Musa Sep 7 '12 at 1:27