Traceroute.Protocols.ICMP.RequestDatagram (traceroute v0.2.4)

View Source

Represents the original ICMP request datagram embedded in ICMP error responses.

When a router or destination sends back an ICMP error (like Time Exceeded or Destination Unreachable), it includes the header and first bytes of the original packet that triggered the error. This struct captures that data for correlation.

Summary

Functions

Parses the original request datagram from an ICMP error response payload.

Types

t()

@type t() :: %Traceroute.Protocols.ICMP.RequestDatagram{
  checksum: binary(),
  code: non_neg_integer(),
  id: non_neg_integer(),
  rest: binary(),
  sequence: non_neg_integer(),
  type: non_neg_integer()
}

Functions

parse(data)

@spec parse(binary()) :: t()

Parses the original request datagram from an ICMP error response payload.