Module ICMPv4.PacketSource

Sourcetype 'a t = {
  1. code : int;
  2. kind : 'a kind;
  3. checksum : int;
  4. shdr : 'a;
}
Sourceand 'a kind =
  1. | Echo_reply : id_and_seq kind
  2. | Destination_unreachable : next_hop_mtu kind
  3. | Source_quench : unused kind
  4. | Redirect : Ipaddr.V4.t kind
  5. | Echo_request : id_and_seq kind
  6. | Time_exceeded : unused kind
  7. | Parameter_problem : pointer kind
  8. | Timestamp_request : id_and_seq kind
  9. | Timestamp_reply : id_and_seq kind
  10. | Information_request : id_and_seq kind
  11. | Information_reply : id_and_seq kind
Sourceand id_and_seq = int * int
Sourceand next_hop_mtu =
  1. | Hop of int
Sourceand pointer =
  1. | Pointer of int
Sourceand unused =
  1. | Unused
Sourceand pack =
  1. | Kind : 'a kind -> pack
Sourceand packet =
  1. | Packet : 'a t -> packet
Sourceval kind : pack Bin.t
Sourceval unused : unused Bin.t
Sourceval id_and_seq : (int * int) Bin.t
Sourceval next_hop_mtu : next_hop_mtu Bin.t
Sourceval pointer : pointer Bin.t
Sourceval shdr : 'a. 'a kind -> 'a Bin.t
Sourceval t : kind:'a kind -> 'a t Bin.t
Sourceval decode : ?off:int -> string -> (packet * string, [> `Invalid_ICMPv4_packet ]) result
Sourceval to_bytes : 'a t -> bytes