Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Header: #include <applibs/networking.h>
Applies lease information to a Networking_DhcpServerConfig struct.
int Networking_DhcpServerConfig_SetLease(Networking_DhcpServerConfig *dhcpServerConfig, struct in_addr startIpAddress, uint8_t ipAddressCount, struct in_addr subnetMask, struct in_addr gatewayAddress, uint32_t leaseTimeInHours);
Parameters
dhcpServerConfigA pointer to the Networking_DhcpServerConfig struct to update.startIpAddressThe starting IP address in the address range to lease.ipAddressCountThe number of IP addresses the server can lease.subnetMaskThe subnet mask for the IP addresses.gatewayAddressThe gateway address for the network interface.leaseTimeInHoursThe duration of the lease, in hours.
Errors
Returns -1 if an error is encountered and sets errno to the error value.
- EFAULT: the
dhcpServerConfigparameter is NULL.
Any other errno may also be specified; such errors aren't deterministic and the same behavior might not be retained through system updates.
Return value
Returns 0 for success, or -1 for failure, in which case errno will be set to the error value.