in reply to Need help with (un)pack templates
CCnnnCCa2CCCCCCCCa*
| C | 4-bit version, 4-bit header length |
| C | 8-bit type of service |
| n | 16-bit total length (in bytes) |
| n | 16-bit identification |
| n | 3-bit flags, 13-bit fragment offset |
| C | 8-bit time to live |
| C | 8-bit protocol |
| a2 | 16-bit header checksum |
| CCCC | 32-bit source IP address |
| CCCC | 32-bit destination IP address |
| a* | data if any (assuming no IP header options) |
Wonder why they used a2 instead of n for the checksum?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Need help with (un)pack templates
by AnomalousMonk (Archbishop) on Dec 20, 2009 at 15:52 UTC | |
|
Re^2: Need help with (un)pack templates
by Subop (Acolyte) on Dec 20, 2009 at 14:01 UTC | |
by gmargo (Hermit) on Dec 20, 2009 at 14:08 UTC | |
by Subop (Acolyte) on Dec 20, 2009 at 14:23 UTC | |
by gmargo (Hermit) on Dec 20, 2009 at 14:39 UTC | |
by ikegami (Patriarch) on Dec 20, 2009 at 17:25 UTC | |
by keszler (Priest) on Dec 20, 2009 at 15:06 UTC | |
| |
by Subop (Acolyte) on Dec 20, 2009 at 15:47 UTC |