Zephyr API Documentation  3.5.0
A Scalable Open Source RTOS
3.5.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

DHCPv4. More...

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

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.

Enumeration Type Documentation

◆ net_dhcpv4_msg_type

#include <zephyr/net/dhcpv4.h>

DHCPv4 message types.

These enumerations represent RFC2131 defined msy type codes, hence they should not be renumbered.

Additions, removald and reorders in this definition must be reflected within corresponding changes to net_dhcpv4_msg_type_name.

Enumerator
NET_DHCPV4_MSG_TYPE_DISCOVER 
NET_DHCPV4_MSG_TYPE_OFFER 
NET_DHCPV4_MSG_TYPE_REQUEST 
NET_DHCPV4_MSG_TYPE_DECLINE 
NET_DHCPV4_MSG_TYPE_ACK 
NET_DHCPV4_MSG_TYPE_NAK 
NET_DHCPV4_MSG_TYPE_RELEASE 
NET_DHCPV4_MSG_TYPE_INFORM 

Function Documentation

◆ net_dhcpv4_msg_type_name()

const char * net_dhcpv4_msg_type_name ( enum net_dhcpv4_msg_type  msg_type)

#include <zephyr/net/dhcpv4.h>

Return a text representation of the msg_type.

Parameters
msg_typeThe msg_type to be converted to text
Returns
A text representation of msg_type

◆ net_dhcpv4_restart()

void net_dhcpv4_restart ( struct net_if iface)

#include <zephyr/net/dhcpv4.h>

Restart DHCPv4 client on an iface.

Restart DHCPv4 client on a given interface. DHCPv4 client will restart the state machine without any of the initial delays used in start.

Parameters
ifaceA valid pointer on an interface

◆ net_dhcpv4_start()

void net_dhcpv4_start ( struct net_if iface)

#include <zephyr/net/dhcpv4.h>

Start DHCPv4 client on an iface.

Start DHCPv4 client on a given interface. DHCPv4 client will start negotiation for IPv4 address. Once the negotiation is success IPv4 address details will be added to interface.

Parameters
ifaceA valid pointer on an interface

◆ net_dhcpv4_stop()

void net_dhcpv4_stop ( struct net_if iface)

#include <zephyr/net/dhcpv4.h>

Stop DHCPv4 client on an iface.

Stop DHCPv4 client on a given interface. DHCPv4 client will remove all configuration obtained from a DHCP server from the interface and stop any further negotiation with the server.

Parameters
ifaceA valid pointer on an interface