Basic Work With libpcap - Understanding The TCP header
- The contents of a TCP packet's headers are 20 bytes.
- interesting fields:
- first short word (bytes 0-1) - source port, in network byte-order.
- second short word (bytes 2-3) - destination port, in network byte-order.
Originally written by
guy keren