package mirage-types
Ethernet interface
An Ethernet stack that parses frames from a network device and can associate them with IP address via ARP.
type buffer = Cstruct.t
Abstract type for a memory buffer that may not be page aligned
type ipv4addr = Ipaddr.V4.t
Abstract type for an IPv4 address representation.
type error = [
| `Unknown of string
(*an undiagnosed error
*)| `Unimplemented
(*operation not yet implemented in the code
*)| `Disconnected
(*the device has been previously disconnected
*)
]
IO operation errors
type macaddr = Macaddr.t
Unique MAC identifier for the device
writev nf bufs
output a list of buffers to netfront nf
as a single packet.
listen nf fn
is a blocking operation that calls fn buf
with every packet that is read from the interface. It returns as soon as it has initialised, and the function can be stopped by calling disconnect
in the device layer.
Query the association from an IPV4 address to a MAC address. TODO: clarify if this task is guaranteed to be cancelable or not.