Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
openapi_common.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2023 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_common.h
28 *
29 * @purpose Base Services.
30 *
31 * @component OpEN
32 *
33 * @create 07/13/2012
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef _OPENAPI_COMMON_H_
39 #define _OPENAPI_COMMON_H_
40 
41 #include <stdint.h>
42 #include <arpa/inet.h>
43 #include <netinet/in.h>
44 
45 /* Some structures need to be packed on platforms that use
46 ** 64 bit OpEN API libraries and 32 bit network operating system.
47 */
48 #if defined (__i386__) || defined (__x86_64__)
49  #define OPEN_PACKED_STRUCT typedef struct __attribute__((__packed__))
50 #else
51  #define OPEN_PACKED_STRUCT typedef struct
52 #endif
53 
54 
55 /*
56  * OPEN API error codes.
57  *
58  * Note: Values used in this enum for non-zero entries must
59  * be different than those used in L7_RPCCLT_RC_t.
60  * OPEN API calls via RPC may return error code values
61  * from L7_RPCCLT_RC_t in certain situations.
62  */
64 typedef enum
65 {
67  OPEN_E_RPC = -20,
69  OPEN_E_PARAM = -22,
70  OPEN_E_FULL = -23,
71  OPEN_E_EXISTS = -24,
73  OPEN_E_FAIL = -26,
77  OPEN_E_EMPTY = -30,
78  OPEN_E_ERROR = -31,
80  OPEN_E_BUSY = -33
81 } open_error_t;
82 
84 typedef enum
85 {
86  OPEN_EVENT_INTERFACE = 0, /* This first event must be 0 */
87  OPEN_EVENT_VLAN = 1,
88  OPEN_EVENT_ROUTE = 2,
89  OPEN_EVENT_ROUTING_INTERFACE = 3,
90  OPEN_EVENT_ISSU_START = 4,
91  OPEN_EVENT_READY_STATE = 5, /* Configurator transition to/from execute state */
92  OPEN_EVENT_CONFIG = 6,
93  OPEN_EVENT_LAST /* Must be last. Can be incremented as needed */
94 } OPEN_EVENT_e;
95 
96 typedef struct
97 {
98  unsigned char open_event_mask [((OPEN_EVENT_LAST) / 8) + 1];
100 
101 /* OpEN registration service identifiers supported for
102  * external OpEN API clients.
103  *
104  * Internal clients have their own set of identifiers
105  * (unpublished) that are not included here, hence the
106  * use of #define instead of an enumeration.
107  *
108  * NOTE: Defining values that are not likely to get
109  * confused with the actual service ID values.
110  * All values listed here get converted to their
111  * real server ID values by the API implementation.
112  */
113 #define OPEN_REGISTRATION_SERVICE_USERAPPS 100001 /* all user-provided applications */
114 
115 /* First instance number for a given RPC client (by convention).
116  *
117  * Note: Mirrors L7_RPCCLT_INSTANCE_FIRST definition.
118  */
119 #define OPEN_CLIENT_INSTANCE_FIRST 1
120 
122 typedef enum
123 {
127 
128 /* OpEN client handle struct. Only use provided accessor functions to
129  * retrieve any contents.
130  */
132 {
133  char content[256];
134 };
135 
137 
138 typedef struct
139 {
140  uint32_t size; /* total buffer size (IN) / content length (OUT) */
141  void *pstart; /* ptr to buffer starting location */
142 } open_buffdesc;
143 
144 typedef struct
145 {
146  uint8_t release;
147  uint8_t version;
148  uint8_t maint_level;
149  uint8_t build_num;
151 
152 /* Network interface */
153 typedef struct
154 {
155  uint8_t unit;
156  uint8_t slot;
157  uint16_t port;
158 
159 } open_USP_t;
160 
163 typedef enum
164 {
168 
170 typedef enum
171 {
176 
179 typedef enum
180 {
183 } OPEN_BOOL_t;
184 
186 typedef enum
187 {
192 
194 typedef enum
195 {
196  OPEN_ACTION_ADD = 0,
197  OPEN_ACTION_DELETE = 1
198 
199 } OPEN_ACTION_t;
200 
201 typedef enum
202 {
214 
216 typedef enum
217 {
222 
225 typedef enum
226 {
231 
232 #define OPEN_MAC_ADDR_LEN 6
233 #define OPEN_MAC_ADDR_STR_LEN (OPEN_MAC_ADDR_LEN * 3)
234 
235 #define OPEN_MIN_U64_STR_BUFFER_SIZE 21
237 #define OPEN_DATE_TIME_OUTPUT_FORMAT "%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d"
238 #define OPEN_DATE_TIME_BUF_LEN 20 /* includes trailing '\0' */
239 
241 typedef enum
242 {
247 
250 typedef enum
251 {
255 } OPEN_AF_t;
256 
259 typedef enum
260 {
263 } OPEN_AFX_t;
264 
266 typedef enum
267 {
268  OPEN_PREF_RESERVED = 0, /* Not a valid protocol */
269  OPEN_PREF_LOCAL = 1,
270  OPEN_PREF_STATIC = 2,
271  OPEN_PREF_MPLS = 3,
272  OPEN_PREF_OSPF_INTRA_AREA = 4,
273  OPEN_PREF_OSPF_INTER_AREA = 5,
274  OPEN_PREF_OSPF_EXTERNAL = 6,
275  OPEN_PREF_RIP = 7,
276  OPEN_PREF_IBGP = 8,
277  OPEN_PREF_EBGP = 9,
278  OPEN_PREF_6TO4 = 10,
279  OPEN_PREF_GLOBAL_DEFAULT_GATEWAY = 11,
280  OPEN_PREF_DEFAULT_DHCP = 12,
281  OPEN_PREF_LOCAL_BGP = 13,
282  OPEN_PREF_LAST /* Always keep this last */
284 
286 typedef enum
287 {
288  OPEN_REDIST_RT_FIRST = 0,
289  OPEN_REDIST_RT_LOCAL = 1,
290  OPEN_REDIST_RT_STATIC = 2,
291  OPEN_REDIST_RT_RIP = 3,
292  OPEN_REDIST_RT_OSPF = 4,
293  OPEN_REDIST_RT_BGP = 5,
294  OPEN_REDIST_RT_OSPFV3 = 6,
295  OPEN_REDIST_RT_LAST
297 
300 typedef struct open_in6_addr_s
301 {
302  union
303  {
304  uint32_t addr32[4];
305  uint16_t addr16[8];
306  uint8_t addr8[16];
307  }u;
309 
310 typedef struct open_inet_addr_s
311 {
312  OPEN_AF_t family;
313  union
314  {
315  /* IPv4 address always in host byte order */
316  uint32_t ipv4;
317  open_in6_addr_t ipv6;
318  } addr;
320 
321 typedef struct open_inet_pfx_s
322 {
323  open_inet_addr_t ipAddr;
324  uint32_t pfxLen;
325 
327 
328 
329 typedef enum
330 {
339 
340 
341 #define OPEN_IS_ADDR_EQUAL(xaddr, yaddr) \
342  ( (OPEN_AF_INET6 == ((open_inet_addr_t *)(xaddr))->family) ? \
343  ( (((open_inet_addr_t *)(xaddr))->addr.ipv6.u.addr32[0] == \
344  ((open_inet_addr_t *)(yaddr))->addr.ipv6.u.addr32[0]) && \
345  (((open_inet_addr_t *)(xaddr))->addr.ipv6.u.addr32[1] == \
346  ((open_inet_addr_t *)(yaddr))->addr.ipv6.u.addr32[1]) && \
347  (((open_inet_addr_t *)(xaddr))->addr.ipv6.u.addr32[2] == \
348  ((open_inet_addr_t *)(yaddr))->addr.ipv6.u.addr32[2]) && \
349  (((open_inet_addr_t *)(xaddr))->addr.ipv6.u.addr32[3] == \
350  ((open_inet_addr_t *)(yaddr))->addr.ipv6.u.addr32[3]) ) : \
351  ( ((open_inet_addr_t *)(xaddr))->addr.ipv4 == \
352  ((open_inet_addr_t *)(yaddr))->addr.ipv4) )
353 
354 #define OPEN_INTF_NAME_MAX_LENGTH 60
355 #define OPEN_IP_ADDR_DISP_LENGTH 46
356 #define OPENAPI_VER_BUFF_MAX_SIZE 128
357 #define OPEN_IP_ADDR_LENGTH 16
358 #define OPENAPI_VER_BUFF_MAX_SIZE 128
359 
361 typedef enum
362 {
363  OPEN_PASSWORD_ENCRYPT_NONE = 0,
364  OPEN_PASSWORD_ENCRYPT_AES = 1,
365  OPEN_PASSWORD_ENCRYPT_MD5 = 2
367 
369 typedef enum
370 {
376 
378 typedef enum
379 {
385 
386 typedef unsigned char maskValue_t;
387 
388 #define OPEN_MASK_UNIT (sizeof(maskValue_t) * 8)
389 #define OPEN_MASK_LEN(_size) ((((_size) - 1) / OPEN_MASK_UNIT) + 1)
390 
392 #define OPEN_SETMASKBIT(j, k) \
393  ((j)[(k - 1) / OPEN_MASK_UNIT] |= 1 << ((k - 1) % OPEN_MASK_UNIT))
396 #define OPEN_CLRMASKBIT(j, k) \
397  ((j)[(k - 1) / OPEN_MASK_UNIT] &= ~(1 << ((k - 1) % OPEN_MASK_UNIT)))
398 
399 
402 #define OPEN_NONZEROMASK(_mask, _result, _size) \
403  do \
404  { \
405  uint32_t _i_; \
406  maskValue_t *_p_ = (maskValue_t *)&(_mask); \
407  \
408  (_result) = 0; \
409  for (_i_ = 0; _i_ < OPEN_MASK_LEN(_size); _i_++) \
410  { \
411  if (_p_[_i_] != 0) \
412  { \
413  (_result) = 1; \
414  break; \
415  } \
416  } \
417  } while (0)
418 
419 
421 #define OPEN_ISMASKBITSET(j, k) \
422  ((j)[((k - 1) / OPEN_MASK_UNIT)] & ( 1 << ((k - 1) % OPEN_MASK_UNIT)))
423 
426 #define OPENAPI_PROTOCOL_HEX_IP 0x0800
427 #define OPENAPI_PROTOCOL_HEX_ARP 0x0806
428 #define OPENAPI_PROTOCOL_HEX_IPX 0x8137
429 #define OPENAPI_PROTOCOL_HEX_MIN 0x0600
430 #define OPENAPI_PROTOCOL_HEX_MAX 0xFFFF
432 #define OPEN_MATCH_EXACT 1
433 #define OPEN_MATCH_GETNEXT 2
434 #define OPEN_MATCH_FREE 3
435 
436 #define OPEN_VRF_MAX_NAME_LEN 15
437 
438 #define OPEN_RPC_CLT_RECV_DEF_TIMEOUT 0
439 #define OPEN_RPC_CLT_RECV_MIN_TIMEOUT 1
440 #define OPEN_RPC_CLT_RECV_MAX_TIMEOUT 65535
442 /* RPC debug counters */
443 typedef struct
444 {
445  uint32_t msendok;
446  uint32_t mrecvok;
447  uint32_t mnowait;
448  uint32_t msendfail;
449  uint32_t mrecvfail;
450  uint32_t mrecvseqerr;
451  uint32_t mrecvtimeout;
452  uint32_t mrecvtrunc;
453  uint32_t mconnfail;
457 #define OPEN_MAX_MPLS_IMPOSE_LABELS 3
460 typedef struct
461 {
462  uint32_t label[OPEN_MAX_MPLS_IMPOSE_LABELS];
464 
466 /*****************************************************************/
481  open_revision_data_t *version);
482 
483 /*****************************************************************/
497  uint32_t *intf);
498 
499 /*****************************************************************/
516  uint32_t *maxPaths);
517 
518 /*****************************************************************/
527 void openapiEventListClear(openapiEventList_t *event_mask);
528 
529 /*****************************************************************/
539 void openapiEventSet(openapiEventList_t *event_mask, OPEN_EVENT_e event_handle);
540 
541 /*****************************************************************/
553 int openapiEventIsSet(openapiEventList_t *event_mask, OPEN_EVENT_e event_handle);
554 
555 /*****************************************************************/
581 open_error_t openapiClientRegister(char *client_name,
582  openapiClientHandle_t *client_handle);
583 
584 /*****************************************************************/
625  OPEN_REGISTER_FLAGS_t reg_flags,
626  openapiClientHandle_t *client_handle);
627 
628 /*****************************************************************/
668  int32_t client_inst,
669  int32_t server_id,
670  openapiClientHandle_t *client_handle);
671 
672 /*****************************************************************/
700  openapiClientHandle_t *client_handle);
701 
702 /*****************************************************************/
718 
719 /*****************************************************************/
737 
738 /*****************************************************************/
756  openapiEventList_t *event_mask);
757 
758 /*****************************************************************/
777  openapiEventList_t *changed_mask,
778  openapiEventList_t *purged_mask);
779 
780 /*****************************************************************/
799  int32_t timeout_secs);
800 
801 
802 /*****************************************************************/
816  uint32_t *max_interface_count);
817 
818 /*****************************************************************/
834  uint32_t *system_is_ready);
835 
836 /*****************************************************************/
853  openapiClientHandle_t *client_handle,
854  uint32_t *system_is_ready);
855 
856 /*****************************************************************/
868 
869 /*****************************************************************/
885 
886 /*****************************************************************/
901  open_buffdesc *version);
902 
903 /*****************************************************************/
919  uint32_t *inetAddrMaxSize);
920 
921 /*****************************************************************/
940  open_buffdesc *version);
941 
942 /*****************************************************************/
959  open_buffdesc *ip1Str,
960  open_buffdesc *ip2Str,
961  OPEN_BOOL_t *equal);
962 
963 /*****************************************************************/
982  open_buffdesc *ipStr,
983  open_inet_addr_t *ipAddr);
984 
985 /*****************************************************************/
1006  open_buffdesc *ipOrHostStr,
1007  open_inet_addr_t *inetAddr);
1008 
1009 /*****************************************************************/
1027  uint16_t seqNo, uint32_t rtt, uint32_t type, open_buffdesc *srcIp );
1028 
1029 /*****************************************************************/
1050 open_error_t openapiTraceRouteCallbackFn(openapiClientHandle_t *client_handle, uint32_t numProbes, uint32_t ttl, uint32_t ipDa,
1051  uint16_t hopCount, uint16_t probeCount, uint32_t rtt, uint8_t errSym);
1052 
1053 /*****************************************************************/
1065 open_error_t openapiCurrentSDMGet(openapiClientHandle_t *client_handle, uint32_t *sdm_template);
1066 
1067 /*****************************************************************/
1086  open_inet_addr_t ipAddr,
1087  OPEN_BOOL_t * isZero);
1088 
1089 /*****************************************************************/
1104  uint32_t * maxLen);
1105 
1106 /*****************************************************************/
1120  uint32_t intfNum,
1121  open_buffdesc * bufdName);
1122 
1123 /*****************************************************************/
1137  uint32_t * maxLen);
1138 
1139 /*****************************************************************/
1154  open_inet_addr_t openAddr,
1155  open_buffdesc * bufdName);
1156 
1157 /*****************************************************************/
1181  uint32_t *fileNameLen);
1182 
1183 /*****************************************************************/
1207  uint32_t *fileNameLen);
1208 
1209 /*****************************************************************/
1226  uint32_t unit,
1227  uint32_t slot,
1228  uint32_t port,
1229  open_buffdesc * bufdName);
1230 
1231 /*****************************************************************/
1246  uint32_t *intfNum);
1247 
1248 /*****************************************************************/
1272  open_buffdesc *inputMac,
1273  open_buffdesc *outputMac);
1274 
1275 /*****************************************************************/
1295  uint32_t inputTime,
1296  open_buffdesc *outputTime);
1297 
1298 /*****************************************************************/
1325  uint32_t timeout);
1326 
1327 /*****************************************************************/
1342  uint32_t *timeout);
1343 
1344 /*****************************************************************/
1357 
1358 /*****************************************************************/
1369 
1370 #endif /* _OPENAPI_COMMON_H_ */
1371 
OPEN_MGMT_PORT_TYPE_t
Untagged or priority tagged frames.
open_error_t openapiImageFileNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *fileNameLen)
Get the maximum length of an image file name (excluding its path) in the file system.
open_error_t openapiAllIntfNumGet(openapiClientHandle_t *client_handle, uint32_t *intfNum)
Get the count of all interfaces.
Success.
open_error_t openapiIntfNameGet(openapiClientHandle_t *client_handle, uint32_t intfNum, open_buffdesc *bufdName)
Get interface name for a given internal interface number.
open_error_t openapiIntfNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Get maximum length of interface name.
Port is enabled.
open_error_t openapiIntfDisplayNameGet(openapiClientHandle_t *client_handle, uint32_t unit, uint32_t slot, uint32_t port, open_buffdesc *bufdName)
Get the display name of given interface.
Rate in packets/sec.
struct open_in6_addr_s open_in6_addr_t
Hash Mode names.
Parameter/feature is not supported.
open_error_t openapiCurrentSDMGet(openapiClientHandle_t *client_handle, uint32_t *sdm_template)
Get the current active SDM template in the system.
open_error_t openapiConnectivityCheck(openapiClientHandle_t *client_handle)
Return code indicates whether the OpEN remote procedure call infrastructure is ready.
OPEN_AFX_t
OPEN uses these enumerators to indicate BGP address family index of routes or policy for IPV4 or IPV6...
Address type unknown.
open_error_t openapiApiVersionGet(openapiClientHandle_t *client_handle, open_revision_data_t *version)
Returns the revision of the OPEN API.
Address type DNS.
Port is disabled by protocol.
OPEN_REGISTER_FLAGS_t
Open API enhanced registration flags.
OPEN_REDIST_RT_INDICES_t
Redistribution route types.
Operation Fail.
Error in RPC.
int openapiClientNotifySocketFDGet(openapiClientHandle_t *client_handle)
Accessor function to retrieve the socket FD for event notifications from OpEN.
CPU interface.
OPEN_DOT1Q_ACCEPT_FRAME_TYPE_t
OPEN uses these enumerators to indicate the types of frames that may be received on this port...
Rate in kilobytes/sec.
open_error_t
OPEN uses these enumerators to indicate the error codes.
Operation Timeout.
IPV6 address family.
open_error_t openapiSystemReadyStateGet(openapiClientHandle_t *client_handle, uint32_t *system_is_ready)
Determine whether the system is currently operational or not operational.
OPEN_INTF_TYPE_t
IPV6 address family.
open_error_t openapiTimeToCalenderTimeGet(openapiClientHandle_t *client_handle, uint32_t inputTime, open_buffdesc *outputTime)
Convert time (seconds) to calender time format.
Link Down.
Physical interface.
open_error_t openapiInternalClientTearDown(openapiClientHandle_t *client_handle)
Deregister an internal OpEN client.
open_error_t openapiInetAddrGet(openapiClientHandle_t *client_handle, open_buffdesc *ipStr, open_inet_addr_t *ipAddr)
Get the IP address in network byte order from string format.
Operation dependency not met.
open_error_t openapiPendingEventsGet(openapiClientHandle_t *client_handle, openapiEventList_t *changed_mask, openapiEventList_t *purged_mask)
Check what events are pending for this client.
OPEN_RATE_UNIT_t
OpEN uses this enumeration to define rate units.
No special flags needed.
open_error_t openapiHardwareVersionGet(openapiClientHandle_t *client_handle, open_buffdesc *version)
Returns hardware version of the switch.
open_error_t openapiMaxInterfaceCountGet(openapiClientHandle_t *client_handle, uint32_t *max_interface_count)
Get the maximum number of interfaces on this switch.
VLAN interface.
open_error_t openapiMacAddrStringToHexGet(openapiClientHandle_t *client_handle, open_buffdesc *inputMac, open_buffdesc *outputMac)
Get the MAC address in 6-byte hexadecimal format from string format.
Already exists.
void openapiEventSet(openapiEventList_t *event_mask, OPEN_EVENT_e event_handle)
Set a particular event type to the event bit mask.
Parameter not found.
open_error_t openapiEventWait(openapiClientHandle_t *client_handle, int32_t timeout_secs)
Wait for Open API events for this client.
OPEN_AF_t
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
open_error_t openapiClientReceiveTimeoutSet(openapiClientHandle_t *client_handle, uint32_t timeout)
Set the RPC client receive socket time out.
Invalid parameter.
OPEN_ACTION_t
OPEN uses these enumerators to indicate the interface types.
open_error_t openapiInetAddrCompare(openapiClientHandle_t *client_handle, open_buffdesc *ip1Str, open_buffdesc *ip2Str, OPEN_BOOL_t *equal)
Check if the two IP address strings refer to the same address.
open_error_t openapiClientRegister(char *client_name, openapiClientHandle_t *client_handle)
Register as a client with the OpEN API and wait until OpEN API services are available.
IPV4 address family.
Error conditions.
OPEN_PORT_STATE_t
OPEN uses these enumerators to indicate port admin mode enable, disable or diag_disable.
MPLS label stack.
open_error_t openapiClientStatsPrint(void)
Print the RPC client statistics.
open_error_t openapiCpuIntfGet(openapiClientHandle_t *client_handle, uint32_t *intf)
Returns the CPU control plane interface number.
open_error_t openapiNetworkOSVersionGet(openapiClientHandle_t *client_handle, open_buffdesc *version)
Returns the revision of the network operating system running on the switch.
open_error_t openapiEventRegister(openapiClientHandle_t *client_handle, openapiEventList_t *event_mask)
Register the client to receive event notifications for one or more event types.
Useful on openapiIfNextGet() to get all interfaces.
open_error_t openapiClientRegisterEnhanced(char *client_name, OPEN_REGISTER_FLAGS_t reg_flags, openapiClientHandle_t *client_handle)
Register as a client with the OpEN API using enhanced options and wait until OpEN API services are av...
open_error_t openapiInetAddrFromIPAddrHostNameStr(openapiClientHandle_t *client_handle, open_buffdesc *ipOrHostStr, open_inet_addr_t *inetAddr)
Converts network address string containing either an IPv4/IPv6 address or a host name into an inetAdd...
#define OPEN_MAX_MPLS_IMPOSE_LABELS
Maximum MPLS impose lables.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
Nothing to report or table is empty.
Service port interface.
int openapiEventIsSet(openapiEventList_t *event_mask, OPEN_EVENT_e event_handle)
Check if a particular event is set in a bit mask of events.
open_error_t openapiClientTearDown(openapiClientHandle_t *client_handle)
Teardown and cleanup the connection resources.
OPEN_PREF_INDICES_t
Route Preference Types.
OPEN_VLAN_PARTICIPATION_MODE_t
OPEN uses these enumerators to indicate the VLAN participation of a given interface.
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
OPEN_ACCESS_LINE_t
open_error_t openapiIsInetAddrZero(openapiClientHandle_t *client_handle, open_inet_addr_t ipAddr, OPEN_BOOL_t *isZero)
Check if the given IP address is zero or not.
void openapiEventListClear(openapiEventList_t *event_mask)
Clear all the bit mask of events.
open_error_t openapiServiceClientRegister(char *client_name, int32_t client_inst, int32_t server_id, openapiClientHandle_t *client_handle)
Register as a client of a specified OpEN API service and wait until the service is available...
Address type IPv4.
Rate in percentage of link speed.
OPEN_PASSWORD_ENCRYPT_ALG_t
OpEN uses this enumeration to define encryption types.
OPEN_IP_ADDRESS_TYPE_t
OpEN uses this enumeration to define IP address types.
System is busy (doing some important/time consuming operations/updates)
Multi-threaded application.
open_error_t openapiSystemFileNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *fileNameLen)
Get the maximum length of a file name (including its path) in the file system.
Internal error.
Tunnel interface.
Neither IPV4 nor IPV6.
open_error_t openapiClientReceiveTimeoutGet(openapiClientHandle_t *client_handle, uint32_t *timeout)
Get the RPC client receive socket time out.
open_error_t openapiPingCallback(openapiClientHandle_t *client_handle, uint16_t seqNo, uint32_t rtt, uint32_t type, open_buffdesc *srcIp)
Send the ping response to the client(CLI/Telnet/SSH) session.
open_error_t openapiIpAddressMaxStringLength(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Get maximum string length of IP address.
open_error_t openapiOspfEqualCostRoutesMax(openapiClientHandle_t *client_handle, uint32_t *maxPaths)
Get the number of equal cost routes supported by this platform.
open_error_t openapiClientRpcStatsGet(openapiClientRpcStats_t *stats)
Get the RPC client statistics.
open_error_t openapiSystemReadyStateTransitionNextGet(openapiClientHandle_t *client_handle, uint32_t *system_is_ready)
Get the next configurator state transition event.
open_error_t openapiInetAddrMaxSizeGet(openapiClientHandle_t *client_handle, uint32_t *inetAddrMaxSize)
Get the maximum size of inet address length.
Loopback interface.
IPV4 address family.
Address type IPv6.
OPEN_EVENT_e
Open API Events for which clients can register.
OPEN_LINK_STATE_t
OPEN uses these enumerators to indicate the link status.
Port is disabled.
Maximum count is already reached or table full.
Rate unit none.
open_error_t openapiOpenIPtoStringGet(openapiClientHandle_t *client_handle, open_inet_addr_t openAddr, open_buffdesc *bufdName)
Get human readable string format of given IP address.
open_error_t openapiTraceRouteCallbackFn(openapiClientHandle_t *client_handle, uint32_t numProbes, uint32_t ttl, uint32_t ipDa, uint16_t hopCount, uint16_t probeCount, uint32_t rtt, uint8_t errSym)
Send the traceroute response to the client(CLI/Telnet/SSH) session.
Hash Mode names.
Any other interface type.
LAG interface.
open_error_t openapiInternalClientRegister(char *client_name, openapiClientHandle_t *client_handle)
Register as an internal client with the OpEN API and wait until OpEN API services are available...