Zephyr Project API 3.7.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dhcpv4.h File Reference

DHCPv4 Client Handler. More...

#include <zephyr/sys/slist.h>
#include <zephyr/types.h>

Go to the source code of this file.

Typedefs

typedef void(* net_dhcpv4_option_callback_handler_t) (struct net_dhcpv4_option_callback *cb, size_t length, enum net_dhcpv4_msg_type msg_type, struct net_if *iface)
 Define the application callback handler function signature.
 

Enumerations

enum  net_dhcpv4_msg_type {
  NET_DHCPV4_MSG_TYPE_DISCOVER = 1 , NET_DHCPV4_MSG_TYPE_OFFER = 2 , NET_DHCPV4_MSG_TYPE_REQUEST = 3 , NET_DHCPV4_MSG_TYPE_DECLINE = 4 ,
  NET_DHCPV4_MSG_TYPE_ACK = 5 , NET_DHCPV4_MSG_TYPE_NAK = 6 , NET_DHCPV4_MSG_TYPE_RELEASE = 7 , NET_DHCPV4_MSG_TYPE_INFORM = 8
}
 DHCPv4 message types. More...
 

Functions

static void net_dhcpv4_init_option_callback (struct net_dhcpv4_option_callback *callback, net_dhcpv4_option_callback_handler_t handler, uint8_t option, void *data, size_t max_length)
 Helper to initialize a struct net_dhcpv4_option_callback properly.
 
int net_dhcpv4_add_option_callback (struct net_dhcpv4_option_callback *cb)
 Add an application callback.
 
int net_dhcpv4_remove_option_callback (struct net_dhcpv4_option_callback *cb)
 Remove an application callback.
 
static void net_dhcpv4_init_option_vendor_callback (struct net_dhcpv4_option_callback *callback, net_dhcpv4_option_callback_handler_t handler, uint8_t option, void *data, size_t max_length)
 Helper to initialize a struct net_dhcpv4_option_callback for encapsulated vendor-specific options properly.
 
int net_dhcpv4_add_option_vendor_callback (struct net_dhcpv4_option_callback *cb)
 Add an application callback for encapsulated vendor-specific options.
 
int net_dhcpv4_remove_option_vendor_callback (struct net_dhcpv4_option_callback *cb)
 Remove an application callback for encapsulated vendor-specific options.
 
void net_dhcpv4_start (struct net_if *iface)
 Start DHCPv4 client on an iface.
 
void net_dhcpv4_stop (struct net_if *iface)
 Stop DHCPv4 client on an iface.
 
void net_dhcpv4_restart (struct net_if *iface)
 Restart DHCPv4 client on an iface.
 
const char * net_dhcpv4_msg_type_name (enum net_dhcpv4_msg_type msg_type)
 Return a text representation of the msg_type.
 

Detailed Description

DHCPv4 Client Handler.