package tcpip
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=d452e23f4e62c8b32c977f742e72c50fe673b82e23dc80b29d8263be764d2c72
sha512=9a4aeb5c7ec0392524d1d261026e5de047dec09054f2dca63d9743aed1d27ccfd655ae693554091b4ef7d9eabfeef218e71e8bf13ea8304ebedd8e8a7d4f484a
doc/tcpip.ipv6/Ipv6/Make/argument-1-N/index.html
Parameter Make.N
The type for network interface errors.
Disconnect from the network device. While this might take some time to complete, it can never result in an error.
write net ~size fill
allocates a buffer of length size
, where size
must not exceed the interface maximum packet size (mtu
plus Ethernet header). The allocated buffer is zeroed and passed to the fill
function which returns the payload length, which may not exceed the length of the buffer. When fill
returns, a sub buffer is put on the wire: the allocated buffer from index 0 to the returned length.
listen ~header_size net fn
waits for a packet
with size at most header_size + mtu
on the network device. When a packet
is received, an asynchronous task is created in which fn packet
is called. The ownership of packet
is transferred to fn
. The function can be stopped by calling disconnect
.
val mtu : t -> int
mtu net
is the Maximum Transmission Unit of net
. This excludes the Ethernet header.
val get_stats_counters : t -> Mirage_net.stats
Obtain the most recent snapshot of the interface statistics.
val reset_stats_counters : t -> unit
Reset the statistics associated with this interface to their defaults.