Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
Data Structures | Macros | Enumerations | Functions
DHCP Server API [OPENAPI_DHCP_SERVER]

Data Structures

struct  OPEN_DHCP_SERVER_CLIENT_ID_t
 
struct  OPEN_DHCP_SERVER_POOL_NAME_t
 
struct  OPEN_DHCP_SERVER_POOL_VRF_NAME_t
 
struct  openDhcpsDefaultRouters_t
 
struct  openDhcpsDnsServers_t
 
struct  openDhcpsNetbiosServers_t
 
struct  openDhcpsNtpServers_t
 

Macros

#define OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN   255
 Maximum client ID, includes terminating '\0'.
 
#define OPEN_DHCP_SERVER_CLIENT_ID_STR_MAXLEN   (3 * OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN)
 Maximum client id string lenght in xx:xx:xx:xx.... More...
 
#define OPEN_DHCP_SERVER_CLIENT_NAME_MAXLEN   31
 Maximum client name length. More...
 
#define OPEN_DHCP_SERVER_POOL_NAME_MAXLEN   32
 Maximum pool name, includes terminating '\0'.
 
#define OPEN_DHCP_SERVER_POOL_VRF_NAME_MAXLEN   65
 Maximum VRF name, includes terminating '\0'.
 
#define OPEN_DHCPS_BOOT_FILE_NAME_MAXLEN   128
 
#define OPEN_DHCPS_DEFAULT_ROUTER_MAX   8
 
#define OPEN_DHCPS_DNS_SERVER_MAX   8
 
#define OPEN_DHCPS_DOMAIN_NAME_MAXLEN   255
 
#define OPEN_DHCPS_LEASETIME_MAX   86400
 60 days
 
#define OPEN_DHCPS_LEASETIME_MIN   1
 1 minute
 
#define OPEN_DHCPS_MAX_POOL_NUMBER   256
 
#define OPEN_DHCPS_NETBIOS_NAME_SERVER_MAX   8
 
#define OPEN_DHCPS_NTP_SERVER_MAX   2
 
#define OPEN_DHCPS_POOL_NAME_MAXLEN   31
 
#define OPEN_DHCPS_POOL_NAME_MINLEN   1
 

Enumerations

enum  OPEN_DHCP_SERVER_LEASE_STATE_t {
  OPEN_DHCP_SERVER_FREE_LEASE = 0, OPEN_DHCP_SERVER_ACTIVE_LEASE = 1, OPEN_DHCP_SERVER_OFFERED_LEASE = 2, OPEN_DHCP_SERVER_EXPIRED_LEASE = 3,
  OPEN_DHCP_SERVER_ABANDONED_LEASE = 4
}
 
enum  OPEN_DHCP_SERVER_POOL_TYPE_t { OPEN_DHCP_SERVER_POOL_TYPE_INACTIVE = 0, OPEN_DHCP_SERVER_POOL_TYPE_DYNAMIC = 1, OPEN_DHCP_SERVER_POOL_TYPE_MANUAL = 2 }
 < Pool types More...
 
enum  OPEN_DHCPS_HW_TYPES_t { OPEN_DHCPS_HW_TYPE = 1, OPEN_DHCPS_HW_TYPE_10B = 1, OPEN_DHCPS_HW_TYPE_IEEE802 = 6 }
 
enum  OPEN_DHCPS_STAT_ID_t {
  OPEN_DHCPS_STAT_ID_RESERVED = 0, OPEN_DHCPS_STAT_ID_ACTIVE_LEASES = 1, OPEN_DHCPS_STAT_ID_EXPIRED_LEASES = 2, OPEN_DHCPS_STAT_ID_MALFORMED_MSGS = 3,
  OPEN_DHCPS_STAT_ID_DISCOVER_DROPPED = 4, OPEN_DHCPS_STAT_ID_RX_DISCOVER = 5, OPEN_DHCPS_STAT_ID_RX_REQUEST = 6, OPEN_DHCPS_STAT_ID_RX_DECLINE = 7,
  OPEN_DHCPS_STAT_ID_RX_RELEASE = 8, OPEN_DHCPS_STAT_ID_RX_INFORM = 9, OPEN_DHCPS_STAT_ID_TX_OFFER = 10, OPEN_DHCPS_STAT_ID_TX_ACK = 11,
  OPEN_DHCPS_STAT_ID_TX_NACK = 12, OPEN_DHCPS_STAT_ID_LAST
}
 
enum  OPEN_NETBIOS_NODE_TYPES_t { OPEN_NETBIOS_BROADCAST_NODE = 0x1, OPEN_NETBIOS_P2P_NODE = 0x2, OPEN_NETBIOS_MIXED_NODE = 0x4, OPEN_NETBIOS_HYBRID_NODE = 0x8 }
 

Functions

open_error_t openapiConvertClientId (openapiClientHandle_t *client_handle, open_buffdesc *clientIdBuf, OPEN_DHCP_SERVER_CLIENT_ID_t *clientId, uint32_t *clientIdLen)
 Utility fucntion to convert user provided client id to string format as required for the open api. More...
 
open_error_t openapiDhcpsAdminModeGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Get the DHCP server admin mode. More...
 
open_error_t openapiDhcpsAdminModeSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 Set the DHCP server admin mode. More...
 
open_error_t openapiDhcpsBootfileDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the boot file name. More...
 
open_error_t openapiDhcpsBootfileGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *fileName)
 Get the boot file name. More...
 
open_error_t openapiDhcpsBootfileSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *fileName)
 Set the boot file name. More...
 
open_error_t openapiDhcpsBootpAutomaticGet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
 Get the Bootp client allocation mode. More...
 
open_error_t openapiDhcpsBootpAutomaticSet (openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
 Set the Bootp client allocation mode. More...
 
open_error_t openapiDhcpsClientIdDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the client identifier of the DHCP client. More...
 
open_error_t openapiDhcpsClientIdGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_DHCP_SERVER_CLIENT_ID_t *clientId, uint32_t *clientIdLen)
 Get the client identifier of the DHCP client. More...
 
open_error_t openapiDhcpsClientIdSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_DHCP_SERVER_CLIENT_ID_t *clientId, uint32_t clientIdLen)
 Configure the client identifier of the DHCP client. More...
 
open_error_t openapiDhcpsClientNameDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the client name of the DHCP client. More...
 
open_error_t openapiDhcpsClientNameGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *ClientName)
 Get the client name of the DHCP client. More...
 
open_error_t openapiDhcpsClientNameSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *ClientName)
 Configure the client name of the DHCP client. More...
 
open_error_t openapiDhcpsDefaultRoutersGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsDefaultRouters_t *defaultRouters)
 Get the default routers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDefaultRoutersReset (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Reset the default routers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDefaultRoutersSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsDefaultRouters_t *defaultRouters)
 Set the default routers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDnsServersGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsDnsServers_t *dnsServers)
 Get the DNS servers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDnsServersReset (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Reset the DNS servers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDnsServersSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsDnsServers_t *dnsServers)
 Set the DNS servers for DHCP hosts in a given pool. More...
 
open_error_t openapiDhcpsDomainNameDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the domain name of a DHCP client. More...
 
open_error_t openapiDhcpsDomainNameGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *domainName)
 Get the domain name of a DHCP client. More...
 
open_error_t openapiDhcpsDomainNameSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *domainName)
 Set the domain name of a DHCP client. More...
 
open_error_t openapiDhcpServerAllLeaseDataClear (openapiClientHandle_t *client_handle)
 Clear all lease data across all VRFs. More...
 
open_error_t openapiDhcpServerExcludedAddressRangeAdd (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *lowIpAddr, open_inet_addr_t *highIpAddr)
 Add an excluded-address range for a given VRF instance. More...
 
open_error_t openapiDhcpServerExcludedAddressRangeDelete (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *lowIpAddr, open_inet_addr_t *highIpAddr)
 Delete an excluded-address range for a given VRF instance. More...
 
open_error_t openapiDhcpServerExcludedAddressRangeEntryFirstGet (openapiClientHandle_t *client_handle, uint32_t *pRangeIndex, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *startIpAddr, open_inet_addr_t *endIpAddr)
 Get the first DHCP server excluded IP address range entry. More...
 
open_error_t openapiDhcpServerExcludedAddressRangeEntryNextGet (openapiClientHandle_t *client_handle, uint32_t *pRangeIndex, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *startIpAddr, open_inet_addr_t *endIpAddr)
 Get the next DHCP server excluded IP address range entry. More...
 
open_error_t openapiDhcpServerLeaseDataGet (openapiClientHandle_t *client_handle, open_inet_addr_t *ipaddr, uint32_t *mask, open_buffdesc *hwaddr, OPEN_DHCP_SERVER_CLIENT_ID_t *clientId, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, uint32_t *remaining)
 Get the DHCP Server Lease Data. More...
 
open_error_t openapiDhcpServerLeaseEntryFirstGet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, uint32_t *leaseIndex, open_inet_addr_t *ipaddr, OPEN_DHCP_SERVER_LEASE_STATE_t *state)
 Get the first DHCP Server Lease Entry. More...
 
open_error_t openapiDhcpServerLeaseEntryNextGet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, uint32_t *leaseIndex, open_inet_addr_t *ipaddr, OPEN_DHCP_SERVER_LEASE_STATE_t *state)
 Get the next DHCP Server Lease Entry. More...
 
open_error_t openapiDhcpServerPoolEntryFirstGet (openapiClientHandle_t *client_handle, uint32_t *poolIndex, OPEN_DHCP_SERVER_POOL_NAME_t *poolName)
 Get the first DHCP Server Pool Entry. More...
 
open_error_t openapiDhcpServerPoolEntryNextGet (openapiClientHandle_t *client_handle, uint32_t *poolIndex, OPEN_DHCP_SERVER_POOL_NAME_t *poolName)
 Get the next DHCP Server Pool Entry. More...
 
open_error_t openapiDhcpServerPoolIpAddrLeaseDataClear (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, open_inet_addr_t *ipaddr)
 Clear lease data for pool name and IP address. More...
 
open_error_t openapiDhcpServerPoolLeaseDataClear (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName)
 Clear all lease data of a pool. More...
 
open_error_t openapiDhcpServerPoolTypeGet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, OPEN_DHCP_SERVER_POOL_TYPE_t *type)
 Get the DHCP Server Pool Type. More...
 
open_error_t openapiDhcpServerPoolVrfNameGet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName)
 Get the name of the VRF instance of a given DHCP server pool. More...
 
open_error_t openapiDhcpServerPoolVrfNameSet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName)
 Set the name of the VRF instance of a given DHCP server pool. More...
 
open_error_t openapiDhcpServerPoolVrfNameSetToDefaultVrf (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName)
 Set the name of the VRF instance of a given DHCP server pool. More...
 
open_error_t openapiDhcpServerStatGet (openapiClientHandle_t *client_handle, OPEN_DHCPS_STAT_ID_t id, uint32_t *val)
 Get the specified DHCP Server statistic. More...
 
open_error_t openapiDhcpServerVrfIpAddrLeaseDataClear (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *ipaddr)
 Clear lease data for VRF name and IP address. More...
 
open_error_t openapiDhcpServerVrfIpAddrLeaseDataGet (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName, open_inet_addr_t *ipaddr, uint32_t *mask, open_buffdesc *hwaddr, OPEN_DHCP_SERVER_CLIENT_ID_t *clientId, OPEN_DHCP_SERVER_POOL_NAME_t *poolName, uint32_t *remaining)
 Get the DHCP server lease data for a given VRF name and IP address. More...
 
open_error_t openapiDhcpServerVrfLeaseDataClear (openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName)
 Clear all lease data of a VRF instance. More...
 
open_error_t openapiDhcpsHostDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the DHCP Host address and mask for a pool. More...
 
open_error_t openapiDhcpsHostGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t *hostAddr)
 Get the DHCP Host network for a manual pool. More...
 
open_error_t openapiDhcpsHostSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t hostAddr)
 Set the DHCP Host network for a manual pool. More...
 
open_error_t openapiDhcpsHwAddressDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the DHCP host hardware address for a manual pool. More...
 
open_error_t openapiDhcpsHwAddressGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *hwAddr, OPEN_DHCPS_HW_TYPES_t *hwType)
 Get the DHCP host hardware address for a manual pool. More...
 
open_error_t openapiDhcpsHwAddressSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *hwAddr, OPEN_DHCPS_HW_TYPES_t hwType)
 Set the DHCP host hardware address for a manual pool. More...
 
open_error_t openapiDhcpsLeaseTimeGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, uint32_t *leaseTime)
 Get the DHCP lease time. More...
 
open_error_t openapiDhcpsLeaseTimeReset (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Reset the DHCP lease time. More...
 
open_error_t openapiDhcpsLeaseTimeSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, uint32_t leaseTime)
 Set the DHCP lease time. More...
 
open_error_t openapiDhcpsNetbiosNameServerAddressDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the Netbios name server addresses in given pool. More...
 
open_error_t openapiDhcpsNetbiosNameServerAddressGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNetbiosServers_t *netBiosNameServers)
 Get the Netbios name server addresses in given pool. More...
 
open_error_t openapiDhcpsNetbiosNameServerAddressSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNetbiosServers_t *netBiosNameServers)
 Set the Netbios name server addresses in given pool. More...
 
open_error_t openapiDhcpsNetbiosNodeTypeDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the type of Netbios node. More...
 
open_error_t openapiDhcpsNetbiosNodeTypeGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_NETBIOS_NODE_TYPES_t *nodeType)
 Get the type of Netbios node. More...
 
open_error_t openapiDhcpsNetbiosNodeTypeSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_NETBIOS_NODE_TYPES_t nodeType)
 Set the type of Netbios node. More...
 
open_error_t openapiDhcpsNetworkDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the DHCP Host network for a pool. More...
 
open_error_t openapiDhcpsNetworkGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t *networkAddr)
 Get the DHCP Host network for a pool. More...
 
open_error_t openapiDhcpsNetworkSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t networkAddr)
 Set the DHCP Host network for a pool. More...
 
open_error_t openapiDhcpsNextServerDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the next server IP address. More...
 
open_error_t openapiDhcpsNextServerGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_addr_t *nextAddress)
 Get the next server IP address. More...
 
open_error_t openapiDhcpsNextServerSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_addr_t nextAddress)
 Set the next server IP address. More...
 
open_error_t openapiDhcpsNoOfPingPktGet (openapiClientHandle_t *client_handle, uint32_t *pingPacketCount)
 Get the number of pings to be sent out by DHCP server before assigning the address. More...
 
open_error_t openapiDhcpsNoOfPingPktReset (openapiClientHandle_t *client_handle)
 Set the number of pings to be sent out by DHCP server before assigning the address, to default count. More...
 
open_error_t openapiDhcpsNoOfPingPktSet (openapiClientHandle_t *client_handle, uint32_t pingPacketCount)
 Set the number of pings to be sent out by DHCP server before assigning the address. More...
 
open_error_t openapiDhcpsNTPServerDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete the NTP server addresses for a given pool. More...
 
open_error_t openapiDhcpsNTPServerGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNtpServers_t *ntpServers)
 Get the NTP server addresses for a given pool. More...
 
open_error_t openapiDhcpsNTPServerSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNtpServers_t *ntpServers)
 Set the NTP server addresses for a given pool. More...
 
open_error_t openapiDhcpsPoolAutoDefaultRouterModeGet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_BOOL_t *isAutoDefRtrModeEnabled)
 Get the auto default router mode for a given DHCP Pool name. More...
 
open_error_t openapiDhcpsPoolAutoDefaultRouterModeSet (openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_BOOL_t isAutoDefRtrModeEnabled)
 Set the auto default router mode for a given DHCP Pool name. More...
 
open_error_t openapiDhcpsPoolCreate (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Create a DHCP server address pool. More...
 
open_error_t openapiDhcpsPoolDelete (openapiClientHandle_t *client_handle, open_buffdesc *poolName)
 Delete a DHCP server address pool. More...
 
open_error_t openapiDhcpsStatisticsClear (openapiClientHandle_t *client_handle)
 Clear the DHCP server statistics. More...
 

Detailed Description

Macro Definition Documentation

#define OPEN_DHCP_SERVER_CLIENT_ID_STR_MAXLEN   (3 * OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN)

Maximum client id string lenght in xx:xx:xx:xx....

fromat

Examples:
dhcp_server_example.c.

Definition at line 66 of file openapi_dhcp_server.h.

#define OPEN_DHCP_SERVER_CLIENT_NAME_MAXLEN   31

Maximum client name length.

DHCP Pool name

Examples:
dhcp_server_example.c.

Definition at line 67 of file openapi_dhcp_server.h.

Enumeration Type Documentation

Enumerator
OPEN_DHCP_SERVER_FREE_LEASE 

Free.

OPEN_DHCP_SERVER_ACTIVE_LEASE 

Active.

OPEN_DHCP_SERVER_OFFERED_LEASE 

Offered.

OPEN_DHCP_SERVER_EXPIRED_LEASE 

Expired.

OPEN_DHCP_SERVER_ABANDONED_LEASE 

Abandoned.

Definition at line 54 of file openapi_dhcp_server.h.

< Pool types

Enumerator
OPEN_DHCP_SERVER_POOL_TYPE_INACTIVE 

inactive

OPEN_DHCP_SERVER_POOL_TYPE_DYNAMIC 

dynamic

OPEN_DHCP_SERVER_POOL_TYPE_MANUAL 

manual

Definition at line 46 of file openapi_dhcp_server.h.

Enumerator
OPEN_DHCPS_STAT_ID_RESERVED 

Reserved (unused).

OPEN_DHCPS_STAT_ID_ACTIVE_LEASES 

Active leases.

OPEN_DHCPS_STAT_ID_EXPIRED_LEASES 

Expired leases.

OPEN_DHCPS_STAT_ID_MALFORMED_MSGS 

Malformed messages.

OPEN_DHCPS_STAT_ID_DISCOVER_DROPPED 

Discover messages dropped.

OPEN_DHCPS_STAT_ID_RX_DISCOVER 

Discover messages received.

OPEN_DHCPS_STAT_ID_RX_REQUEST 

Request messages received.

OPEN_DHCPS_STAT_ID_RX_DECLINE 

Decline messages received.

OPEN_DHCPS_STAT_ID_RX_RELEASE 

Release messages received.

OPEN_DHCPS_STAT_ID_RX_INFORM 

Inform messages received.

OPEN_DHCPS_STAT_ID_TX_OFFER 

Offer messages sent.

OPEN_DHCPS_STAT_ID_TX_ACK 

Ack messages sent.

OPEN_DHCPS_STAT_ID_TX_NACK 

Nack messages sent.

OPEN_DHCPS_STAT_ID_LAST 

Must be last (bounds checking).

Definition at line 88 of file openapi_dhcp_server.h.

Enumerator
OPEN_NETBIOS_BROADCAST_NODE 

Broadcast node.

OPEN_NETBIOS_P2P_NODE 

Peer to Peer node.

OPEN_NETBIOS_MIXED_NODE 

Mixed node.

OPEN_NETBIOS_HYBRID_NODE 

Hybrid node.

Definition at line 107 of file openapi_dhcp_server.h.

Function Documentation

open_error_t openapiConvertClientId ( openapiClientHandle_t client_handle,
open_buffdesc clientIdBuf,
OPEN_DHCP_SERVER_CLIENT_ID_t clientId,
uint32_t *  clientIdLen 
)

Utility fucntion to convert user provided client id to string format as required for the open api.

Parameters
[in]client_handleclient handle from registration API
[in]clientIdBufBuffer containing client id string in xx:xx:xx:xx:xx:xx.... format
[out]clientIdClient Identifier of the DHCP client in OPEN_DHCP_SERVER_CLIENT_ID_t format
[out]clientIdLenLength of the client identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsAdminModeGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t mode 
)

Get the DHCP server admin mode.

Parameters
[in]client_handleclient handle from registration API
[out]modeDHCP Server mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsAdminModeSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  mode 
)

Set the DHCP server admin mode.

Parameters
[in]client_handleclient handle from registration API
[in]modeDHCP Server mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsBootfileDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the boot file name.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsBootfileGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc fileName 
)

Get the boot file name.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]fileNameBoot file name for Bootp client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsBootfileSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc fileName 
)

Set the boot file name.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]fileNameBoot file name for Bootp client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsBootpAutomaticGet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t mode 
)

Get the Bootp client allocation mode.

Parameters
[in]client_handleclient handle from registration API
[out]modeBootp auto allocation mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsBootpAutomaticSet ( openapiClientHandle_t client_handle,
OPEN_CONTROL_t  mode 
)

Set the Bootp client allocation mode.

Parameters
[in]client_handleclient handle from registration API
[in]modeBootp auto allocation mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientIdDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the client identifier of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientIdGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_DHCP_SERVER_CLIENT_ID_t clientId,
uint32_t *  clientIdLen 
)

Get the client identifier of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]clientIdClient Identifier of the DHCP client
[out]clientIdLenLength of the client identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientIdSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_DHCP_SERVER_CLIENT_ID_t clientId,
uint32_t  clientIdLen 
)

Configure the client identifier of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]clientIdClient Identifier of the DHCP client
[in]clientIdLenLength of the client identifier
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientNameDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the client name of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientNameGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc ClientName 
)

Get the client name of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]ClientNameName of the DHCP client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsClientNameSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc ClientName 
)

Configure the client name of the DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]ClientNameName of the DHCP client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDefaultRoutersGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsDefaultRouters_t defaultRouters 
)

Get the default routers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]defaultRoutersArray of default router address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDefaultRoutersReset ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Reset the default routers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDefaultRoutersSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsDefaultRouters_t defaultRouters 
)

Set the default routers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]defaultRoutersArray of default router address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDnsServersGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsDnsServers_t dnsServers 
)

Get the DNS servers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]dnsServersArray of DNS server address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDnsServersReset ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Reset the DNS servers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDnsServersSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsDnsServers_t dnsServers 
)

Set the DNS servers for DHCP hosts in a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]dnsServersArray of DNS server address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDomainNameDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the domain name of a DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDomainNameGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc domainName 
)

Get the domain name of a DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]domainNameDomain name of the DHCP client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsDomainNameSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc domainName 
)

Set the domain name of a DHCP client.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]domainNameDomain name of the DHCP client
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerAllLeaseDataClear ( openapiClientHandle_t client_handle)

Clear all lease data across all VRFs.

Parameters
[in]client_handleClient handle from registration API
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerExcludedAddressRangeAdd ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t lowIpAddr,
open_inet_addr_t highIpAddr 
)

Add an excluded-address range for a given VRF instance.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF instance name
[in]lowIpAddrStart IPv4 address of the address range
[in]highIpAddrEnd IPv4 address of the address range
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif add operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerExcludedAddressRangeDelete ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t lowIpAddr,
open_inet_addr_t highIpAddr 
)

Delete an excluded-address range for a given VRF instance.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF instance name
[in]lowIpAddrStart IPv4 address of the address range
[in]highIpAddrEnd IPv4 address of the address range
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif delete operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerExcludedAddressRangeEntryFirstGet ( openapiClientHandle_t client_handle,
uint32_t *  pRangeIndex,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t startIpAddr,
open_inet_addr_t endIpAddr 
)

Get the first DHCP server excluded IP address range entry.

Parameters
[in]client_handleClient handle from registration API
[in]pRangeIndexIndex to get first entry
[out]vrfNameName of VRF instance in which IP addresses are configured to be excluded
[out]startIpAddrStarting IP address of range
[out]endIpAddrEnding IP address of range
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure or no entry found found.
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerExcludedAddressRangeEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t *  pRangeIndex,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t startIpAddr,
open_inet_addr_t endIpAddr 
)

Get the next DHCP server excluded IP address range entry.

Parameters
[in]client_handleClient handle from registration API
[in]pRangeIndexIndex to get next entry
[out]vrfNameName of VRF instance in which IP addresses are configured to be excluded
[out]startIpAddrStarting IP address of range
[out]endIpAddrEnding IP address of range
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_NOT_FOUNDif no entry found
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerLeaseDataGet ( openapiClientHandle_t client_handle,
open_inet_addr_t ipaddr,
uint32_t *  mask,
open_buffdesc hwaddr,
OPEN_DHCP_SERVER_CLIENT_ID_t clientId,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
uint32_t *  remaining 
)

Get the DHCP Server Lease Data.

Parameters
[in]client_handleClient handle from registration API
[in]ipaddrIP address assigned to lease
[out]maskIP Mask
[out]hwaddrHardware address
[out]clientIdClient ID
[out]poolNamePool name
[out]remainingRemaining time in seconds
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied
Note
Hardware address is returned as a 6 byte raw hex value, and must be of size OPEN_MAC_ADDR_LEN

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerLeaseEntryFirstGet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
uint32_t *  leaseIndex,
open_inet_addr_t ipaddr,
OPEN_DHCP_SERVER_LEASE_STATE_t state 
)

Get the first DHCP Server Lease Entry.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[out]leaseIndexLease index
[out]ipaddrLease IP address
[out]stateState of the lease
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure or no entry found found.
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerLeaseEntryNextGet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
uint32_t *  leaseIndex,
open_inet_addr_t ipaddr,
OPEN_DHCP_SERVER_LEASE_STATE_t state 
)

Get the next DHCP Server Lease Entry.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[in,out]leaseIndexLease index
[out]ipaddrLease IP address
[out]stateState of the lease
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_NOT_FOUNDif no entry found
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolEntryFirstGet ( openapiClientHandle_t client_handle,
uint32_t *  poolIndex,
OPEN_DHCP_SERVER_POOL_NAME_t poolName 
)

Get the first DHCP Server Pool Entry.

Parameters
[in]client_handleClient handle from registration API
[out]poolIndexPool index
[out]poolNamePool name
Return values
OPEN_E_NONEif successful
OPEN_E_NOT_FOUNDif no entry found
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolEntryNextGet ( openapiClientHandle_t client_handle,
uint32_t *  poolIndex,
OPEN_DHCP_SERVER_POOL_NAME_t poolName 
)

Get the next DHCP Server Pool Entry.

Parameters
[in]client_handleClient handle from registration API
[in,out]poolIndexPool index
[out]poolNamePool name
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_NOT_FOUNDif no entry found
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolIpAddrLeaseDataClear ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
open_inet_addr_t ipaddr 
)

Clear lease data for pool name and IP address.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[in]ipaddrIP address assigned to lease
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolLeaseDataClear ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName 
)

Clear all lease data of a pool.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolTypeGet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
OPEN_DHCP_SERVER_POOL_TYPE_t type 
)

Get the DHCP Server Pool Type.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[out]typePool type
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolVrfNameGet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName 
)

Get the name of the VRF instance of a given DHCP server pool.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[out]vrfNameName of VRF-instance of the pool
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolVrfNameSet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName 
)

Set the name of the VRF instance of a given DHCP server pool.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
[in]vrfNameName of VRF-instance of the pool
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerPoolVrfNameSetToDefaultVrf ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_NAME_t poolName 
)

Set the name of the VRF instance of a given DHCP server pool.

Parameters
[in]client_handleClient handle from registration API
[in]poolNamePool name
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerStatGet ( openapiClientHandle_t client_handle,
OPEN_DHCPS_STAT_ID_t  id,
uint32_t *  val 
)

Get the specified DHCP Server statistic.

Parameters
[in]client_handleClient handle from registration API
[in]idStatistic identifier
[out]valStatistic value
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif failure
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.18

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerVrfIpAddrLeaseDataClear ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t ipaddr 
)

Clear lease data for VRF name and IP address.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF instance name
[in]ipaddrIP address assigned to lease
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerVrfIpAddrLeaseDataGet ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName,
open_inet_addr_t ipaddr,
uint32_t *  mask,
open_buffdesc hwaddr,
OPEN_DHCP_SERVER_CLIENT_ID_t clientId,
OPEN_DHCP_SERVER_POOL_NAME_t poolName,
uint32_t *  remaining 
)

Get the DHCP server lease data for a given VRF name and IP address.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF instance name
[in]ipaddrIP address assigned to lease
[out]maskIP Mask
[out]hwaddrHardware address
[out]clientIdClient ID
[out]poolNamePool name
[out]remainingRemaining time in seconds
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied
Note
Hardware address is returned as a 6 byte raw hex value, and must be of size OPEN_MAC_ADDR_LEN

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpServerVrfLeaseDataClear ( openapiClientHandle_t client_handle,
OPEN_DHCP_SERVER_POOL_VRF_NAME_t vrfName 
)

Clear all lease data of a VRF instance.

Parameters
[in]client_handleClient handle from registration API
[in]vrfNameVRF instance name
Return values
OPEN_E_NONEif successful
OPEN_E_FAILif get operation has failed
OPEN_E_PARAMif invalid parameter is supplied

OpEN API Version: 1.20

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHostDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the DHCP Host address and mask for a pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHostGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_pfx_t hostAddr 
)

Get the DHCP Host network for a manual pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]hostAddrAddress to be assigned to the host
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHostSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_pfx_t  hostAddr 
)

Set the DHCP Host network for a manual pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]hostAddrAddress to be assigned to the host
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHwAddressDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the DHCP host hardware address for a manual pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHwAddressGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc hwAddr,
OPEN_DHCPS_HW_TYPES_t *  hwType 
)

Get the DHCP host hardware address for a manual pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]hwAddrHardware address
[out]hwTypeType of hardware address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsHwAddressSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_buffdesc hwAddr,
OPEN_DHCPS_HW_TYPES_t  hwType 
)

Set the DHCP host hardware address for a manual pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]hwAddrHardware address
[in]hwTypeType of hardware address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsLeaseTimeGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
uint32_t *  leaseTime 
)

Get the DHCP lease time.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]leaseTimeLease time in minutes
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsLeaseTimeReset ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Reset the DHCP lease time.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsLeaseTimeSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
uint32_t  leaseTime 
)

Set the DHCP lease time.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]leaseTimeLease time in minutes
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNameServerAddressDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the Netbios name server addresses in given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNameServerAddressGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsNetbiosServers_t netBiosNameServers 
)

Get the Netbios name server addresses in given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]netBiosNameServersArray of Netbios name server addresses
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNameServerAddressSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsNetbiosServers_t netBiosNameServers 
)

Set the Netbios name server addresses in given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]netBiosNameServersArray of Netbios name server addresses
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNodeTypeDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the type of Netbios node.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNodeTypeGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_NETBIOS_NODE_TYPES_t nodeType 
)

Get the type of Netbios node.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]nodeTypeType of the Netbios node
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetbiosNodeTypeSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_NETBIOS_NODE_TYPES_t  nodeType 
)

Set the type of Netbios node.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]nodeTypeType of the Netbios node
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetworkDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the DHCP Host network for a pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetworkGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_pfx_t networkAddr 
)

Get the DHCP Host network for a pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]networkAddrAddress pool used for the hosts
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNetworkSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_pfx_t  networkAddr 
)

Set the DHCP Host network for a pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]networkAddrAddress pool to be assigned to the hosts
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNextServerDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the next server IP address.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNextServerGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_addr_t nextAddress 
)

Get the next server IP address.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]nextAddressNext server address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNextServerSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
open_inet_addr_t  nextAddress 
)

Set the next server IP address.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]nextAddressNext server address
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNoOfPingPktGet ( openapiClientHandle_t client_handle,
uint32_t *  pingPacketCount 
)

Get the number of pings to be sent out by DHCP server before assigning the address.

Parameters
[in]client_handleclient handle from registration API
[out]pingPacketCountNumber of ping packets to be sent
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNoOfPingPktReset ( openapiClientHandle_t client_handle)

Set the number of pings to be sent out by DHCP server before assigning the address, to default count.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNoOfPingPktSet ( openapiClientHandle_t client_handle,
uint32_t  pingPacketCount 
)

Set the number of pings to be sent out by DHCP server before assigning the address.

Parameters
[in]client_handleclient handle from registration API
[in]pingPacketCountNumber of ping packets to be sent
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNTPServerDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete the NTP server addresses for a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNTPServerGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsNtpServers_t ntpServers 
)

Get the NTP server addresses for a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]ntpServersArray of NTP server addresses
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsNTPServerSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
openDhcpsNtpServers_t ntpServers 
)

Set the NTP server addresses for a given pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]ntpServersArray of NTP server addresses
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsPoolAutoDefaultRouterModeGet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_BOOL_t isAutoDefRtrModeEnabled 
)

Get the auto default router mode for a given DHCP Pool name.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[out]isAutoDefRtrModeEnabledFlag to return auto default router mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.28

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsPoolAutoDefaultRouterModeSet ( openapiClientHandle_t client_handle,
open_buffdesc poolName,
OPEN_BOOL_t  isAutoDefRtrModeEnabled 
)

Set the auto default router mode for a given DHCP Pool name.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of the DHCP server address pool
[in]isAutoDefRtrModeEnabledFlag to set auto default router mode
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.28

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsPoolCreate ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Create a DHCP server address pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsPoolDelete ( openapiClientHandle_t client_handle,
open_buffdesc poolName 
)

Delete a DHCP server address pool.

Parameters
[in]client_handleclient handle from registration API
[in]poolNameName of DHCP server address pool
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.
open_error_t openapiDhcpsStatisticsClear ( openapiClientHandle_t client_handle)

Clear the DHCP server statistics.

Parameters
[in]client_handleclient handle from registration API
Return values
OPEN_E_NONEOn success.
OPEN_E_FAILOn failure.
OPEN_E_PARAMInvalid argument.

OpEN API Version: 1.26

Examples:
dhcp_server_example.c.