HeaderIPv4

Summary

Represents an IPv4 header object.

See also

HeaderIP

Properties

Structure

class HeaderIPv4
checksum

The 16bit checksum field is used for error-checking of the header.

Type

uint16 or None

differentiated_services

The TOS field is used to carry information to provide quality of service features.

Type

uint8

fragment_flag

A three-bit field follows and is used to control or identify fragments.

Type

uint8

fragmentation_offset

The fragment offset field specifies the offset of a particular fragment relative to the beginning of the original unfragmented IP datagram.

Type

uint16

identification

This field is an identification field and is primarily used for uniquely identifying fragments of an original IP datagram.

Type

uint16

ihl

The Internet header length field of the packet. Could have None value.

Type

uint8 or None

ip_address_destination

An IPv4 address indicating the receiver of the packet.

Type

str

ip_address_source

An IPv4 address indicating the sender of the packet.

Type

str

length

Total length of the message.

Type

uint16 or None

option

The options of the packet.

Type

IIPOptions

protocol_byte

The protocol version byte.

Type

uint8 or None

time_to_live

This field indicates time to live.

Type

uint8

version

The version of the packet, or None if no version is present.

Type

uint8 or None