Skip to main content

Module extensions

Module extensions 

Source
Expand description

ICMP Extensions Framework (RFC 4884)

ICMP error messages can include extensions that provide additional diagnostic information. The extensions framework defines:

  • Extension Header (4 bytes: version, reserved, checksum)
  • Extension Objects (variable length: len, classnum, classtype, data)

Common extension classes:

  • Class 1: MPLS Label Stack
  • Class 2: Interface Information (RFC 5837)
  • Class 3: Interface Identification

Modules§

class_nums
ICMP Extension class numbers (IANA registry)
header_offsets
ICMP Extension Header offsets (RFC 4884)
object_offsets
ICMP Extension Object offsets

Structs§

InterfaceInfoFlags
Interface Information Object flags (RFC 5837)
InterfaceInformation
Parsed Interface Information extension data (RFC 5837)

Enums§

Afi
Address Family Identifier (AFI) for interface IP addresses
IpAddr
IP address enum for interface information

Constants§

EXTENSION_HEADER_LEN
EXTENSION_OBJECT_MIN_LEN

Functions§

class_name
Get human-readable name for extension class number
extension_offset
Get the offset where ICMP extensions begin in an error message.
has_extensions
Check if ICMP extensions are present in an ICMP error message.
parse_extension_header
Parse the ICMP Extension Header
parse_extension_object
Parse an Extension Object header
parse_interface_information
Parse Interface Information extension object (RFC 5837)
verify_extension_checksum
Verify the extension header checksum