40 #ifndef OPENAPI_DHCP_SERVER_H_INCLUDED
41 #define OPENAPI_DHCP_SERVER_H_INCLUDED
63 #define OPEN_DHCP_SERVER_POOL_NAME_MAXLEN 32
64 #define OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN 255
65 #define OPEN_DHCP_SERVER_POOL_VRF_NAME_MAXLEN 65
66 #define OPEN_DHCP_SERVER_CLIENT_ID_STR_MAXLEN (3 * OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN)
67 #define OPEN_DHCP_SERVER_CLIENT_NAME_MAXLEN 31
118 OPEN_DHCPS_HW_TYPE = 1,
119 OPEN_DHCPS_HW_TYPE_10B = 1,
120 OPEN_DHCPS_HW_TYPE_IEEE802 = 6
121 } OPEN_DHCPS_HW_TYPES_t;
123 #define OPEN_DHCPS_MAX_POOL_NUMBER 256
124 #define OPEN_DHCPS_POOL_NAME_MINLEN 1
125 #define OPEN_DHCPS_POOL_NAME_MAXLEN 31
126 #define OPEN_DHCPS_DEFAULT_ROUTER_MAX 8
127 #define OPEN_DHCPS_DNS_SERVER_MAX 8
128 #define OPEN_DHCPS_NETBIOS_NAME_SERVER_MAX 8
129 #define OPEN_DHCPS_NTP_SERVER_MAX 2
130 #define OPEN_DHCPS_DOMAIN_NAME_MAXLEN 255
131 #define OPEN_DHCPS_BOOT_FILE_NAME_MAXLEN 128
133 #define OPEN_DHCPS_LEASETIME_MIN 1
134 #define OPEN_DHCPS_LEASETIME_MAX 86400
138 uint32_t routers[OPEN_DHCPS_DEFAULT_ROUTER_MAX];
143 uint32_t dns_servers[OPEN_DHCPS_DNS_SERVER_MAX];
148 uint32_t servers [OPEN_DHCPS_NETBIOS_NAME_SERVER_MAX];
153 uint32_t ntp_servers[OPEN_DHCPS_NTP_SERVER_MAX];
184 uint32_t *remaining);
265 uint32_t *leaseIndex,
289 uint32_t *leaseIndex,
384 uint32_t *pRangeIndex,
409 uint32_t *pRangeIndex,
486 uint32_t *remaining);
1378 uint32_t *clientIdLen);
1399 uint32_t clientIdLen);
1420 uint32_t *clientIdLen);
open_error_t openapiDhcpsDomainNameSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *domainName)
Set the domain name of a DHCP client.
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.
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.
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.
open_error_t openapiDhcpServerPoolLeaseDataClear(openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_NAME_t *poolName)
Clear all lease data of a pool.
open_error_t openapiDhcpsNetbiosNodeTypeGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_NETBIOS_NODE_TYPES_t *nodeType)
Get the type of Netbios node.
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.
open_error_t openapiDhcpsClientIdDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the client identifier of the DHCP client.
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.
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.
open_error_t openapiDhcpServerStatGet(openapiClientHandle_t *client_handle, OPEN_DHCPS_STAT_ID_t id, uint32_t *val)
Get the specified DHCP Server statistic.
open_error_t openapiDhcpsNetbiosNodeTypeDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the type of Netbios node.
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.
open_error_t openapiDhcpsLeaseTimeGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, uint32_t *leaseTime)
Get the DHCP lease time.
#define OPEN_DHCP_SERVER_POOL_NAME_MAXLEN
Maximum pool name, includes terminating '\0'.
open_error_t openapiDhcpsNetbiosNameServerAddressSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNetbiosServers_t *netBiosNameServers)
Set the Netbios name server addresses in given pool.
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.
OPEN_DHCP_SERVER_POOL_TYPE_t
< Pool types
open_error_t openapiDhcpsAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Set the DHCP server admin mode.
open_error_t openapiDhcpsClientNameSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *ClientName)
Configure the client name of the DHCP client.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiDhcpsNTPServerGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNtpServers_t *ntpServers)
Get the NTP server addresses for a given pool.
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...
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.
open_error_t openapiDhcpsNetworkSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t networkAddr)
Set the DHCP Host network for a pool.
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.
open_error_t openapiDhcpsNextServerDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the next server IP address.
Request messages received.
Release messages received.
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.
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.
open_error_t openapiDhcpsNTPServerDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the NTP server addresses for a given pool.
open_error_t openapiDhcpsNTPServerSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNtpServers_t *ntpServers)
Set the NTP server addresses for a given pool.
Discover messages dropped.
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.
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.
open_error_t openapiDhcpsDomainNameGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *domainName)
Get the domain name of a DHCP client.
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.
open_error_t openapiDhcpsLeaseTimeSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, uint32_t leaseTime)
Set the DHCP lease time.
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.
open_error_t openapiDhcpsBootfileSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *fileName)
Set the boot file name.
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.
open_error_t openapiDhcpsNetworkGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_pfx_t *networkAddr)
Get the DHCP Host network for a pool.
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.
open_error_t openapiDhcpsClientNameDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the client name of the DHCP client.
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.
open_error_t openapiDhcpsPoolCreate(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Create a DHCP server address pool.
Must be last (bounds checking).
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
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.
Inform messages received.
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.
open_error_t openapiDhcpsNextServerGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_addr_t *nextAddress)
Get the next server IP address.
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.
open_error_t openapiDhcpsNextServerSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_inet_addr_t nextAddress)
Set the next server IP address.
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.
open_error_t openapiDhcpsNetworkDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the DHCP Host network for a pool.
#define OPEN_DHCP_SERVER_POOL_VRF_NAME_MAXLEN
Maximum VRF name, includes terminating '\0'.
open_error_t openapiDhcpsDefaultRoutersReset(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Reset the default routers for DHCP hosts in a given pool.
open_error_t openapiDhcpsBootfileDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the boot file name.
#define OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN
Maximum client ID, includes terminating '\0'.
open_error_t openapiDhcpsBootfileGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *fileName)
Get the boot file name.
open_error_t openapiDhcpsBootpAutomaticGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Get the Bootp client allocation mode.
open_error_t openapiDhcpsClientNameGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, open_buffdesc *ClientName)
Get the client name of the DHCP client.
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.
open_error_t openapiDhcpServerAllLeaseDataClear(openapiClientHandle_t *client_handle)
Clear all lease data across all VRFs.
open_error_t openapiDhcpsNetbiosNodeTypeSet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, OPEN_NETBIOS_NODE_TYPES_t nodeType)
Set the type of Netbios node.
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.
Discover messages received.
OPEN_NETBIOS_NODE_TYPES_t
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.
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.
open_error_t openapiDhcpsNetbiosNameServerAddressDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the Netbios name server addresses in given pool.
open_error_t openapiDhcpsLeaseTimeReset(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Reset the DHCP lease time.
open_error_t openapiDhcpServerVrfLeaseDataClear(openapiClientHandle_t *client_handle, OPEN_DHCP_SERVER_POOL_VRF_NAME_t *vrfName)
Clear all lease data of a VRF instance.
open_error_t openapiDhcpsHwAddressDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the DHCP host hardware address for a manual pool.
open_error_t openapiDhcpsBootpAutomaticSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Set the Bootp client allocation mode.
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.
open_error_t openapiDhcpsDomainNameDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the domain name of a DHCP client.
open_error_t openapiDhcpsPoolDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete a DHCP server address pool.
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.
OPEN_DHCP_SERVER_LEASE_STATE_t
open_error_t openapiDhcpsStatisticsClear(openapiClientHandle_t *client_handle)
Clear the DHCP server statistics.
open_error_t openapiDhcpsHostDelete(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Delete the DHCP Host address and mask for a pool.
open_error_t openapiDhcpsDnsServersReset(openapiClientHandle_t *client_handle, open_buffdesc *poolName)
Reset the DNS servers for DHCP hosts in a given pool.
Decline messages received.
open_error_t openapiDhcpsAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *mode)
Get the DHCP server admin mode.
open_error_t openapiDhcpsNetbiosNameServerAddressGet(openapiClientHandle_t *client_handle, open_buffdesc *poolName, openDhcpsNetbiosServers_t *netBiosNameServers)
Get the Netbios name server addresses in given pool.