module Pdu: sig
.. end
Pack/Unpack a SLL frame.
type
pkt_type =
| |
UnicastIn |
| |
BroadcastIn |
| |
MulticastIn |
| |
OutToOut |
| |
SentByUs |
The 5 possible directions of the frame
val pkt_type_of_int : int -> pkt_type
val int_of_pkt_type : pkt_type -> int
type
t = {
|
pkt_type : pkt_type ; |
|
ll_addr_type : int ; |
|
ll_addr : Bitstring.bitstring ; |
|
proto : Arp.HwProto.t ; |
|
payload : Tools.Payload.t ; |
}
A SLL frame has an address (usually Ethernet), a direction, and a
protocol. Notice the absence of the local address.
val make : ?ll_addr_type:int ->
pkt_type ->
Arp.HwProto.t -> Bitstring.bitstring -> Tools.Payload.outer_t -> t
val random : unit -> t
val pack : t -> Bitstring.bitstring
Pack a
Sll.Pdu.t
into its
bitstring
raw representation.
val unpack : string * int * int -> t option