package charrua-client
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=38158606cc9df794a8081f371782198e3586854eaf8ef7ce1d73a8080aa47734
sha512=443581ab33056062bbe5f456bc5836269a1325d97e1e23c63f87525de4a438500cc4e4c1e080ed560465a97669bda8fc2526b0a8b81d7abce67fb6abc8da5048
doc/charrua-client.lwt/Dhcp_client_lwt/Make/index.html
Module Dhcp_client_lwt.MakeSource
Parameters
module Net : Mirage_net.SSignature
include Mirage_net.S
The type for network interface errors.
The type representing the internal state of the network device.
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.
mtu net is the Maximum Transmission Unit of net. This excludes the Ethernet header.
Obtain the most recent snapshot of the interface statistics.
val connect :
?renew:bool ->
?xid:Cstruct.uint32 ->
?options:Dhcp_wire.dhcp_option list ->
?requests:Dhcp_wire.option_code list ->
Net.t ->
t Lwt.tconnect ~renew ~xid ~options ~requests net starts a DHCP client communicating over the network interface net. The client will attempt to get a DHCP lease at least once, and will return any leases obtained in the stream returned by connect. If renew is true, which it is by default, the client will attempt to renew the lease according to the logic in RFC2131. If renew is false, the client will cancel its listener and end the stream once the first lease has been obtained. The options are the DHCP options sent by the client in the DHCP DISCOVER and DHCP REQUEST. The requests will be transmitted as DHCP parameter request also in the DHCP DISCOVER and DHCP REQUEST.