Open Ethernet Networking (OpEN) API Guide and Reference Manual
3.9.0.2
Welcome
ADK Documentation
API Reference
Files
File List
Globals
api
include
openapi_dhcp_server.h
Go to the documentation of this file.
1
9
/*********************************************************************
10
*
11
* Copyright 2018-2020 Broadcom.
12
*
13
* Licensed under the Apache License, Version 2.0 (the "License");
14
* you may not use this file except in compliance with the License.
15
* You may obtain a copy of the License at
16
*
17
* http://www.apache.org/licenses/LICENSE-2.0
18
*
19
* Unless required by applicable law or agreed to in writing, software
20
* distributed under the License is distributed on an "AS IS" BASIS,
21
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22
* See the License for the specific language governing permissions and
23
* limitations under the License.
24
*
25
**********************************************************************
26
*
27
* @filename openapi_dhcp_server.h
28
*
29
* @purpose DHCP Server API
30
*
31
* @component OpEN
32
*
33
* @note This code must not include any ICOS header files.
34
*
35
* @create 7/6/2018
36
*
37
* @end
38
*
39
**********************************************************************/
40
#ifndef OPENAPI_DHCP_SERVER_H_INCLUDED
41
#define OPENAPI_DHCP_SERVER_H_INCLUDED
42
43
#include "
openapi_common.h
"
44
46
typedef
enum
47
{
48
OPEN_DHCP_SERVER_POOL_TYPE_INACTIVE
= 0,
49
OPEN_DHCP_SERVER_POOL_TYPE_DYNAMIC
= 1,
50
OPEN_DHCP_SERVER_POOL_TYPE_MANUAL
= 2
51
}
OPEN_DHCP_SERVER_POOL_TYPE_t
;
52
54
typedef
enum
55
{
56
OPEN_DHCP_SERVER_FREE_LEASE
= 0,
57
OPEN_DHCP_SERVER_ACTIVE_LEASE
= 1,
58
OPEN_DHCP_SERVER_OFFERED_LEASE
= 2,
59
OPEN_DHCP_SERVER_EXPIRED_LEASE
= 3,
60
OPEN_DHCP_SERVER_ABANDONED_LEASE
= 4,
61
}
OPEN_DHCP_SERVER_LEASE_STATE_t
;
62
63
#define OPEN_DHCP_SERVER_POOL_NAME_MAXLEN 32
64
#define OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN 256
65
#define OPEN_DHCP_SERVER_POOL_VRF_NAME_MAXLEN 65
68
typedef struct
69
{
70
char
name[OPEN_DHCP_SERVER_POOL_NAME_MAXLEN];
71
}
OPEN_DHCP_SERVER_POOL_NAME_t
;
72
74
typedef
struct
75
{
76
char
name[OPEN_DHCP_SERVER_POOL_VRF_NAME_MAXLEN];
77
}
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
;
78
79
81
typedef
struct
82
{
83
char
clientid[OPEN_DHCP_SERVER_CLIENT_ID_MAXLEN];
84
}
OPEN_DHCP_SERVER_CLIENT_ID_t
;
85
87
typedef
enum
88
{
89
OPEN_DHCPS_STAT_ID_RESERVED
= 0,
90
OPEN_DHCPS_STAT_ID_ACTIVE_LEASES
= 1,
91
OPEN_DHCPS_STAT_ID_EXPIRED_LEASES
= 2,
92
OPEN_DHCPS_STAT_ID_MALFORMED_MSGS
= 3,
93
OPEN_DHCPS_STAT_ID_DISCOVER_DROPPED
= 4,
94
OPEN_DHCPS_STAT_ID_RX_DISCOVER
= 5,
95
OPEN_DHCPS_STAT_ID_RX_REQUEST
= 6,
96
OPEN_DHCPS_STAT_ID_RX_DECLINE
= 7,
97
OPEN_DHCPS_STAT_ID_RX_RELEASE
= 8,
98
OPEN_DHCPS_STAT_ID_RX_INFORM
= 9,
99
OPEN_DHCPS_STAT_ID_TX_OFFER
= 10,
100
OPEN_DHCPS_STAT_ID_TX_ACK
= 11,
101
OPEN_DHCPS_STAT_ID_TX_NACK
= 12,
102
OPEN_DHCPS_STAT_ID_LAST
103
}
OPEN_DHCPS_STAT_ID_t
;
104
105
/*****************************************************************/
127
open_error_t
openapiDhcpServerLeaseDataGet
(
openapiClientHandle_t
*client_handle,
128
open_inet_addr_t
*ipaddr,
129
uint32_t *mask,
130
open_buffdesc
*hwaddr,
131
OPEN_DHCP_SERVER_CLIENT_ID_t
*clientId,
132
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
133
uint32_t *remaining);
134
135
/*****************************************************************/
150
open_error_t
openapiDhcpServerPoolEntryFirstGet
(
openapiClientHandle_t
*client_handle,
151
uint32_t *poolIndex,
152
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName);
153
154
/*****************************************************************/
170
open_error_t
openapiDhcpServerPoolEntryNextGet
(
openapiClientHandle_t
*client_handle,
171
uint32_t *poolIndex,
172
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName);
173
174
175
/*****************************************************************/
190
open_error_t
openapiDhcpServerPoolTypeGet
(
openapiClientHandle_t
*client_handle,
191
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
192
OPEN_DHCP_SERVER_POOL_TYPE_t
*type);
193
194
195
/*****************************************************************/
212
open_error_t
openapiDhcpServerLeaseEntryFirstGet
(
openapiClientHandle_t
*client_handle,
213
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
214
uint32_t *leaseIndex,
215
open_inet_addr_t
*ipaddr,
216
OPEN_DHCP_SERVER_LEASE_STATE_t
*state);
217
218
/*****************************************************************/
236
open_error_t
openapiDhcpServerLeaseEntryNextGet
(
openapiClientHandle_t
*client_handle,
237
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
238
uint32_t *leaseIndex,
239
open_inet_addr_t
*ipaddr,
240
OPEN_DHCP_SERVER_LEASE_STATE_t
*state);
241
242
/*****************************************************************/
256
open_error_t
openapiDhcpServerStatGet
(
openapiClientHandle_t
*client_handle,
257
OPEN_DHCPS_STAT_ID_t
id
, uint32_t *val);
258
259
/*****************************************************************/
274
open_error_t
openapiDhcpServerPoolVrfNameGet
(
openapiClientHandle_t
*client_handle,
275
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
276
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName);
277
278
/*****************************************************************/
293
open_error_t
openapiDhcpServerPoolVrfNameSet
(
openapiClientHandle_t
*client_handle,
294
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
295
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName);
296
297
/*****************************************************************/
312
open_error_t
openapiDhcpServerPoolVrfNameSetToDefaultVrf
(
openapiClientHandle_t
*client_handle,
313
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName);
314
315
/*****************************************************************/
333
open_error_t
openapiDhcpServerExcludedAddressRangeEntryFirstGet
(
openapiClientHandle_t
*client_handle,
334
uint32_t *pRangeIndex,
335
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
336
open_inet_addr_t
*startIpAddr,
337
open_inet_addr_t
*endIpAddr);
338
339
/*****************************************************************/
358
open_error_t
openapiDhcpServerExcludedAddressRangeEntryNextGet
(
openapiClientHandle_t
*client_handle,
359
uint32_t *pRangeIndex,
360
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
361
open_inet_addr_t
*startIpAddr,
362
open_inet_addr_t
*endIpAddr);
363
364
/*****************************************************************/
380
open_error_t
openapiDhcpServerExcludedAddressRangeAdd
(
openapiClientHandle_t
*client_handle,
381
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
382
open_inet_addr_t
*lowIpAddr,
383
open_inet_addr_t
*highIpAddr);
384
385
/*****************************************************************/
401
open_error_t
openapiDhcpServerExcludedAddressRangeDelete
(
openapiClientHandle_t
*client_handle,
402
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
403
open_inet_addr_t
*lowIpAddr,
404
open_inet_addr_t
*highIpAddr);
405
406
/*****************************************************************/
429
open_error_t
openapiDhcpServerVrfIpAddrLeaseDataGet
(
openapiClientHandle_t
*client_handle,
430
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
431
open_inet_addr_t
*ipaddr,
432
uint32_t *mask,
433
open_buffdesc
*hwaddr,
434
OPEN_DHCP_SERVER_CLIENT_ID_t
*clientId,
435
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
436
uint32_t *remaining);
437
438
/*****************************************************************/
453
open_error_t
openapiDhcpServerVrfIpAddrLeaseDataClear
(
openapiClientHandle_t
*client_handle,
454
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName,
455
open_inet_addr_t
*ipaddr);
456
457
/*****************************************************************/
472
open_error_t
openapiDhcpServerPoolIpAddrLeaseDataClear
(
openapiClientHandle_t
*client_handle,
473
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName,
474
open_inet_addr_t
*ipaddr);
475
476
/*****************************************************************/
490
open_error_t
openapiDhcpServerVrfLeaseDataClear
(
openapiClientHandle_t
*client_handle,
491
OPEN_DHCP_SERVER_POOL_VRF_NAME_t
*vrfName);
492
493
/*****************************************************************/
507
open_error_t
openapiDhcpServerPoolLeaseDataClear
(
openapiClientHandle_t
*client_handle,
508
OPEN_DHCP_SERVER_POOL_NAME_t
*poolName);
509
510
/*****************************************************************/
523
open_error_t
openapiDhcpServerAllLeaseDataClear
(
openapiClientHandle_t
*client_handle);
524
525
#endif
/* OPENAPI_DHCP_SERVER_H_INCLUDED */
526
© 2022 by Broadcom. All rights reserved.