|
ArvernOS
|
Data Structures | |
| struct | dhcp_header_t |
Functions | |
| bool | dhcp_negotiate (net_interface_t *interface) |
| void | dhcp_receive_packet (net_interface_t *interface, uint8_t *packet, udp_header_t *header) |
| bool dhcp_negotiate | ( | net_interface_t * | interface | ) |
Configures a network interface using DHCP.
DHCP operations fall into four phases: server discovery, IP lease offer, IP lease request, and IP lease acknowledgement. This function implements the four phases and configures the given interface once the IP lease acknowledgement is received.
| interface | the network interface to use |
true when the DHCP negotiation has succeeded, false otherwise | void dhcp_receive_packet | ( | net_interface_t * | interface, |
| uint8_t * | packet, | ||
| udp_header_t * | header ) |
Receives a DHCP packet.
| interface | the interface on which the DHCP packet has been received |
| packet | the DHCP packet |
| header | the UDP header |