Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
Data Structures | Macros | Enumerations | Functions
openapi_dhcp_server.h File Reference
#include "openapi_common.h"

Go to the source code of this file.

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...