Module ICMPv4.Packet

type 'a t = {
  1. code : int;
  2. kind : 'a kind;
  3. checksum : int;
  4. shdr : 'a;
}
and '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
and id_and_seq = int * int
and next_hop_mtu =
  1. | Hop of int
and pointer =
  1. | Pointer of int
and unused =
  1. | Unused
and pack =
  1. | Kind : 'a kind -> pack
and packet =
  1. | Packet : 'a t -> packet
val kind : pack Bin.t
val unused : unused Bin.t
val ipaddr : Ipaddr.V4.t Bin.t
val id_and_seq : (int * int) Bin.t
val next_hop_mtu : next_hop_mtu Bin.t
val pointer : pointer Bin.t
val shdr : 'a. 'a kind -> 'a Bin.t
val t : kind:'a kind -> 'a t Bin.t
val decode : ?off:int -> string -> (packet * string, [> `Invalid_ICMPv4_packet ]) result
val to_bytes : 'a t -> bytes