INtime SDK Help
DHCPLeaseInfoGet
INtime Help

Determine if a network interface is managed by DHCP, and return the associated settings.

#include <sys/dhcpinfo.h>
DHCPLEASEINFO* DHCPLeaseInfoGet(
        const char* ifname        // the interface name. ie1g0, ven0, ...
);

Parameters

ifname
The name of the network interface. Interface names may be obtained using getifaddrs().

Returns

A pointer to a DHCPLEASEINFO structure or NULL if an error occured or the interface is not managed by DHCP.

Status

errno may be one of these values upon failure.
ENODEV          the tcp/ip stack is not running
ENOMEM       a memory allocation failed
ENOENT         the interface is not managed by DHCP
EFTYPE        
an error occured collecting the DHCP Lease information

Remarks

DHCPLeaseInfoGet is not thread safe.

Requirements

Versions Link to
INtime 7.1
See Also