Module Frenetic_kernel.Packet.Ip

IPv4 frame of a packet.

type tp =
| Tcp of Tcp.t
| Udp of Udp.t
| Icmp of Icmp.t
| Igmp of Igmp.t
| Unparsable of nwProto * Cstruct.t

The type tp represents packets at the transport protocol level, which are encapsulated within the IPv4 payload. At present, we only support TCP, UDP, ICMP and IGMP explicitly; otherwise, the raw bytes and IPv4 protocol number are provided.

include sig ... end
val tp_of_sexp : Ppx_sexp_conv_lib.Sexp.t ‑> tp
val sexp_of_tp : tp ‑> Ppx_sexp_conv_lib.Sexp.t
module Flags : sig ... end
type t = {
tos : nwTos;

(** Type of service. *)

ident : int16;

(** Identification. *)

flags : Flags.t;

(** IPv4 header flags. *)

frag : int16;

(** Fragment offset. *)

ttl : int8;

(** Time to live. *)

chksum : int16;

(** Header checksum. *)

src : nwAddr;

(** IP source address. *)

dst : nwAddr;

(** IP destination address. *)

options : Cstruct.t;

(** Uninterpreted IP options. *)

tp : tp;

(** Transport payload. *)

}
include sig ... end
val t_of_sexp : Ppx_sexp_conv_lib.Sexp.t ‑> t
val sexp_of_t : t ‑> Ppx_sexp_conv_lib.Sexp.t