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.
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. *) |
}