Module ipv4

Module ipv4 

Source
Expand description

Contains support for parsing and writing IPv4 packets.

A picture of the IPv4 packet header can be found here (watch out for the MSB 0 bit numbering).

Structs§

IPv4Packet
Interprets the inner bytes as an IPv4 packet.

Enums§

Ipv4Error
Describes the errors which may occur while handling IPv4 packets.

Constants§

DEFAULT_TTL
Default TTL value
IPV4_VERSION
Indicates version 4 of the IP protocol
PROTOCOL_TCP
The IP protocol number associated with TCP.
PROTOCOL_UDP
The IP protocol number associated with UDP.

Functions§

test_speculative_dst_addr
This function checks if buf may hold an IPv4Packet heading towards the given address. Cannot produce false negatives.