Networking_DhcpServerConfiguration Struct

Header: #include <applibs/networking.h>

The DHCP server configuration for a network interface.

Note

This is an alias to a versioned structure. Define NETWORKING_STRUCTS_VERSION to use this alias.

struct Networking_DhcpServerConfiguration {
    uint32_t z__magicAndVersion;
    struct in_addr startIpAddress;
    uint8_t ipAddressCount;
    struct in_addr netMask;
    struct in_addr gatewayAddress;
    struct in_addr ntpServers[3];
    struct uint32_t leaseTimeHours;
};

Members

uint32_t z__magicAndVersion

A magic number that uniquely identifies the struct version.

struct in_addr startIpAddress

The starting IP address. This parameter is in network byte order.

uint8_t ipAddressCount

The number of incrementing IP addresses that are supported. The only supported value is 1.

struct in_addr netMask

The netmask for the IP addresses. This parameter is in network byte order.

struct in_addr gatewayAddress

The gateway address for the interface. This parameter is in network byte order.

Note

Azure Sphere does not support IP routing. This address can indicate an alternate gateway on a private network. All zeros indicate an unspecified value and the DHCP server will not return this option to the client. The gateway address must be in the same subnet as the IP address range specified by startIpAddress and ipAddressCount, and must not overlap with that range.

struct in_addr ntpServers[3]

The NTP server addresses in order of preference. Up to 3 addresses areĀ supported. All zeros indicate an unspecified value and the DHCP server will not return this option to the client. This parameter is in network byte order.

uint32_t leaseTimeHours

The lease time for IP addresses, in hours. The minimum supported value is 1 and the maximum is 24.