Library
Module
Module type
Parameter
Class
Class type
A network interface that serves Ethernet frames.
The type for network errors.
include Mirage_device.S
val write : t -> buffer -> (unit, error) Result.result io
write nf buf
outputs buf
to netfront nf
.
val writev : t -> buffer list -> (unit, error) Result.result io
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. The function can be stopped by calling disconnect
in the device layer.
XXX: listen currently runs forever (documentation wrong)!
val reset_stats_counters : t -> unit
Reset the statistics associated with this device to their defaults.