Module Eth.Pdu

module Pdu: sig .. end
Pack/Unpack an Ethernet frame.

type t = {
   src : Eth.Addr.t;
   dst : Eth.Addr.t;
   proto : Arp.HwProto.t;
   payload : Tools.Payload.t;
}
An Ethernet frame is made up from these constituents
val make : Arp.HwProto.t ->
Eth.Addr.t -> Eth.Addr.t -> Tools.Payload.outer_t -> t
Build an Eth.Pdu.t for the given payload.
val random : unit -> t
Returns a random Eth.Pdu.t.
val pack : t -> Bitstring.bitstring
Pack an Eth.Pdu.t into its bitstring raw representation, ready for injection onto the wire (via Pcap.inject_pdu for instance).
val unpack : string * int * int -> t option
Unpack a bitstring into an Eth.Pdu.t