Module Vlan.Pdu

module Pdu: sig .. end
Pack/Unpack a 802.1q tunnel

type t = {
   prio : int; (*
Priority from 0 - best effot - to 7 - highest
*)
   cfi : bool; (*
Should be zero if you live after 1990
*)
   id : int; (*
The vlan trag itself
*)
   proto : Arp.HwProto.t; (*
What's the payload
*)
   payload : Tools.Payload.t;
}
An 802.1q tunnel is very simple indeed
val make : ?prio:int ->
?cfi:bool -> int -> Arp.HwProto.t -> Tools.Payload.outer_t -> t
Build a Vlan.Pdu.t for the given payload.
val random : unit -> t
Returns a random Vlan.Pdu.t.
val pack : t -> Bitstring.bitstring
Pack a Vlan.Pdu.t into its bitstring raw representation, ready for encapsulation into a Eth.Pdu.t (or anywhere you like).
val unpack : string * int * int -> t option
Unpack a bitstring into a Vlan.Pdu.t