IPv4 - Internet Protocol version 4

pcapkit.protocols.internet.ipv4 contains IPv4 only, which implements extractor for Internet Protocol version 4 (IPv4) *, whose structure is described as below:

Octets

Bits

Name

Description

0

0

ip.version

Version (4)

0

4

ip.hdr_len

Internal Header Length (IHL)

1

8

ip.dsfield.dscp

Differentiated Services Code Point (DSCP)

1

14

ip.dsfield.ecn

Explicit Congestion Notification (ECN)

2

16

ip.len

Total Length

4

32

ip.id

Identification

6

48

Reserved Bit (must be \x00)

6

49

ip.flags.df

Don’t Fragment (DF)

6

50

ip.flags.mf

More Fragments (MF)

6

51

ip.frag_offset

Fragment Offset

8

64

ip.ttl

Time To Live (TTL)

9

72

ip.proto

Protocol (Transport Layer)

10

80

ip.checksum

Header Checksum

12

96

ip.src

Source IP Address

16

128

ip.dst

Destination IP Address

20

160

ip.options

IP Options (if IHL > 5)


Data Structures


*

https://en.wikipedia.org/wiki/IPv4