package frenetic

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

IPv4 frame of a packet.

type tp =
  1. | Tcp of Tcp.t
  2. | Udp of Udp.t
  3. | Icmp of Icmp.t
  4. | Igmp of Igmp.t
  5. | 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.

val sexp_of_tp : tp -> Ppx_sexp_conv_lib.Sexp.t
val tp_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> tp
module Flags : sig ... end
type t = {
  1. tos : nwTos;
    (*

    Type of service.

    *)
  2. ident : int16;
    (*

    Identification.

    *)
  3. flags : Flags.t;
    (*

    IPv4 header flags.

    *)
  4. frag : int16;
    (*

    Fragment offset.

    *)
  5. ttl : int8;
    (*

    Time to live.

    *)
  6. chksum : int16;
    (*

    Header checksum.

    *)
  7. src : nwAddr;
    (*

    IP source address.

    *)
  8. dst : nwAddr;
    (*

    IP destination address.

    *)
  9. options : Cstruct.t;
    (*

    Uninterpreted IP options.

    *)
  10. tp : tp;
    (*

    Transport payload.

    *)
}
include Ppx_sexp_conv_lib.Sexpable.S with type t := t
val t_of_sexp : Sexplib0.Sexp.t -> t
val sexp_of_t : t -> Sexplib0.Sexp.t