Module Vlan.TRX

module TRX: sig .. end
A Vlan TRX accepts raw packets (presumably from some Eth.TRX), unpack them and forward the payload to a callback; and it can be given some payload to tunnel and it will tag it and pass it presumably to an Eth.TRX.

Create it with an Arp.HwProto.t, a prio and vlan id.


type t = {
   prio : int;
   id : int;
   proto : Arp.HwProto.t;
   mutable emit : Bitstring.bitstring -> unit;
   mutable recv : Bitstring.bitstring -> unit;
}
val tx : t -> Tools.Payload.outer_t -> unit
Transmit function. tx t payload will tunnel the payload through this TRX.
val rx : t -> string * int * int -> unit
Receive function, called to output untaggd frames from the 802.1q tunnel.
val make : int -> int -> Arp.HwProto.t -> Tools.trx
Creates a Vlan.TRX.t.
prio : the tunnel priority (0 = default = lowest, 7 = highest).
id : then vlan tag.
proto : the Arp.HwProto.t we want to transmit/receive.