いくつかのIETFドラフトのバージョンを展開することを計画しており、いくつかのコード参照またはガイダンスが必要です。基本的なTCPソケットに精通していますが、要件をコードに変換する方法を知りたいです。
例:Session Initiation Protocol(SIP)Common Log Format(CLF)の形式
翻訳方法を知りたい:
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.
コードに。バージョンを定義するにはどうすればよいですか?どのタイプですか?Int、charなど?
ありがとう