tcpip

OCaml TCP/IP networking stack, used in MirageOS
Library tcpip_arpv4
type error = string
val into_cstruct : t -> Cstruct.t -> ( unit, error ) result

into_cstruct t buf attempts to write an ARP header representing t.op, and the source/destination ip/mac in t into buf at offset 0. buf should be at least 24 bytes in size for the call to succeed.

val make_cstruct : t -> Cstruct.t

given a t, construct and return an ARP header representing t.op, and the source/destination ip/mac in t. make_cstruct will allocate a new 24 bytes for the ARP header it returns.