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§
- IPv4
Packet - Interprets the inner bytes as an IPv4 packet.
Enums§
- Ipv4
Error - 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
bufmay hold an IPv4Packet heading towards the given address. Cannot produce false negatives.