Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.13.1.2
openapi_routing.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2024 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_routing.h
28 *
29 * @purpose Routing Protocol Process Interface
30 *
31 * @component OPEN
32 *
33 * @create 07/10/2012
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_ROUTING_H_INCLUDED
39 #define OPENAPI_ROUTING_H_INCLUDED
40 
41 #include <stdio.h>
42 #include <stddef.h>
43 #include <sys/un.h>
44 
45 #include "openapi_common.h"
46 #include "openapi_mpls.h"
47 
48 /* Event registration variables */
49 #define OPEN_RPPI_CLIENT_NAME_MAX_LEN (32)
50 
54 #define RPPI_BRC_ADDR "/tmp/rppi_brc.%04u"
55 
56 #define ROUTER_EVENT_CLIENT_ADDR "/tmp/rppi_rec.%04u"
57 
58 /* UNIX "address" on client side for policy change notifications */
59 #define RPPI_POLICY_CLIENT_ADDR "/tmp/rppi_pc.%04u"
60 
61 /* The maximum length of an RPPI event message, in bytes. */
62 #define RPPI_MSG_SIZE_MAX 256
63 
64 /* The maximum length of the name of a best route client */
65 #define OPENR_BRC_NAME_LEN 16
66 
67 /* The maximum length of the name of a routing policy client */
68 #define OPENR_POLICY_CLIENT_NAME_LEN 16
69 
70 #define OPENR_RTR_GBL_MSG_LEN (sizeof(openrRouterEventMsg_t))
71 #define OPENR_RTR_INTF_MSG_LEN (sizeof(openrRouterEventMsg_t))
72 
73 /* The maximum length of the name of a routing protocol */
74 #define OPENR_ROUTING_PROTOCOL_NAME_LEN 10
75 
76 /* The maximum number of route changes that we can fetch in one call */
77 #define OPENR_NUM_BEST_ROUTES_PER_GET 50
78 /*
79 * Use the maximum here no matter how many next hops a route has. This
80 * way we can pre-allocate buffers for route gets making them faster.
81 * The number of next hops are indicated in a field in the routes
82 */
83 #define OPENR_PLAT_MAX_ECMP_NEXTHOPS 48
84 
85 /* Number of routes queried to get the policy results */
86 #define OPENR_NUM_ROUTES_CHECK_POLICY_ACTION 50
87 
89 typedef enum
90 {
95 
99 typedef enum
100 {
101  OPEN_ADD_ROUTE = 0,
102  OPEN_DELETE_ROUTE = 1,
103  OPEN_CHANGE_ROUTE = 2
104 
106 
109 typedef enum
110 {
111  OPEN_POLICY_ROUTE_MAP = 1, /* (1 << 0) */
112  OPEN_POLICY_PREFIX_LIST = 2, /* (1 << 1) */
113  OPEN_POLICY_AS_PATH_LIST = 4, /* (1 << 2) */
114  OPEN_POLICY_ACL_ROUTE_FILTER = 8 /* (1 << 3) */
115 
117 
119 typedef enum
120 {
124 
126 typedef enum
127 {
128  OPENR_KEEPALIVE = 1,
129 
130  /* Best route change service messages */
131  OPENR_BEST_ROUTE_CHANGE = 10,
132 
133  /* router event message types */
134  OPENR_RTR_ENABLE = 101,
135  OPENR_RTR_DISABLE = 102,
136  OPENR_RTR_STARTUP_DONE = 103,
137  OPENR_RTR_INTF_CREATE = 104,
138  OPENR_RTR_INTF_DELETE = 105,
139  OPENR_RTR_INTF_ENABLE = 106,
140  OPENR_RTR_INTF_ENABLE_PENDING = 107,
141  OPENR_RTR_INTF_DISABLE = 108,
142  OPENR_RTR_INTF_DISABLE_PENDING = 109,
143  OPENR_RTR_INTF_ADDR_CHANGE = 110,
144  OPENR_RTR_INTF_MTU = 111,
145  OPENR_RTR_INTF_BW_CHANGE = 112,
146  OPENR_RTR_INTF_HOST_MODE = 113,
147  OPENR_RTR_INTF_CFG_CHANGE = 114,
148  OPENR_RTR_VRF_CREATE = 115,
149  OPENR_RTR_VRF_DELETE = 116,
150 
151  OPENR_RTR6_ENABLE = 201,
152  OPENR_RTR6_DISABLE = 202,
153  OPENR_RTR6_STARTUP_DONE = 203,
154  OPENR_RTR6_INTF_CREATE = 204,
155  OPENR_RTR6_INTF_DELETE = 205,
156  OPENR_RTR6_INTF_ENABLE = 206,
157  OPENR_RTR6_INTF_DISABLE = 207,
158  OPENR_RTR6_INTF_ADDR_CHANGE = 208,
159  OPENR_RTR6_INTF_MTU = 209,
160  OPENR_RTR6_INTF_BW_CHANGE = 210,
161  OPENR_RTR6_INTF_HOST_MODE = 211,
162 
163  OPENR_POLICY_CHANGE = 300
164 
166 
167 /* NSF applications that may send IPv4 routes to RTO. Values are powers
168  * of two used to index nsfRoutesPending. RIP and BGP don't support NSF
169  * now but adding values for them anyway. */
170 typedef enum
171 {
172  OPEN_NSF_PROTOCOL_OSPF = 0x1,
173  OPEN_NSF_PROTOCOL_RIP = 0x2,
174  OPEN_NSF_PROTOCOL_BGP = 0x4,
175  OPEN_NSF_PROTOCOL_LAST = 0x8
176 } OPEN_NSF_PROTOCOL_t;
177 
178 typedef enum
179 {
180  OPEN_FILTER_ACTION_PERMIT = 0,
181  OPEN_FILTER_ACTION_DENY = 1
182 } OPEN_FILTER_ACTION_t;
183 
187 {
189  uint16_t msgType;
190 
192  uint16_t msgLen;
193 
195  uint32_t clientId;
196 
198  uint32_t vrfId;
199 
201 
202 typedef struct openrRouterEventMsg_s
203 {
204  /* One of OPENR_MESSAGE_TYPE_t */
205  uint16_t msgType;
206 
207  /* Number of bytes in payload. Includes the Message Type and Message Length fields. */
208  uint16_t msgLen;
209 
210  uint32_t eventSeqNumber;
211 
212  /* For events associated with an interface, this field contains the interface identifier.
213  ** Only sent if needed.
214  */
215  uint32_t ifNum;
216 
217  /* VRF Identifier */
218  uint32_t vrfId;
219 
220  /* Start of the Event specific data memory, which is allocated based on msgType value. */
221  uint8_t data[0];
222 
224 
226 {
227  /* One of OPENR_MESSAGE_TYPE_t */
228  uint16_t msgType;
229 
230  /* Number of bytes in payload. Includes the Message Type and Message Length fields. */
231  uint16_t msgLen;
232 
233  /* Change sequence number */
234  uint32_t seqNo;
235 
236  /* The type of routing policy that changed. One of OPEN_ROUTING_POLICY_TYPE_t */
237  uint32_t policyType;
238 
239  /* The type of change. One of OPEN_ROUTING_POLICY_CHANGE_t. */
240  uint32_t changeType;
241 
242  /* Name or number of changed policy follows the changeType. */
243 
245 
246 typedef struct openNextHop_s
247 {
250 
253  uint32_t ifNum;
254 
258 
259 } openNextHop_t;
260 
261 
262 typedef struct openRoute_s
263 {
267  uint8_t pfxLen;
268 
271  uint8_t routeType;
272 
277  uint32_t protoId;
278 
281  uint32_t vrfId;
282 
285  uint8_t rejectRoute;
286 
289  uint8_t discardRoute;
290 
294  uint8_t pref;
295 
297  uint32_t metric;
298 
300  uint32_t numNextHops;
301 
303  uint8_t leakedRoute;
304 
305  /* Flag to indicate if this is an RFC 5549 route */
306  uint8_t rfc5549Route;
307 
308  /* Flag to indicate if this route is unnumbered. */
309  uint8_t unnumberedRoute;
310 
311  /* Flag to indicate if this route is MPLS. */
312  uint8_t mplsRoute;
313 
314  /* Flag to indicate if this route is Syncdb entry. */
315  uint8_t syncdbRoute;
316 
317  /* Flag to indicate if this route is static recursive. */
318  uint8_t staticRecursiveRoute;
319 } openRoute_t;
320 
321 /*
322  * This structure defines a route change event. It contains the best route data,
323  * the operation being performed and the set of next hops. It also contains a flag
324  * that indicates whether more route changes are pending based on which a
325  * subsequent call can be made
326  */
327 typedef struct openRouteChange_s
328 {
329  /* The route itself */
330  openRoute_t route;
331 
332  /* operation being performed, change type */
333  uint8_t chType;
334 
335  /* The set of next hops, will assume the maximum value of all supported platforms here */
336  openNextHop_t nextHops[OPENR_PLAT_MAX_ECMP_NEXTHOPS];
337 
338  /* Is it valid, needed because an ip and mask of 0 are valid and cannot be checked against */
339  uint8_t valid;
340 
342 
343 /* Needed by openapi to be a structure as arrays cannot be handled over RPC */
344 typedef struct openRouteChangeList_s
345 {
346  openRouteChange_t routeChange[OPENR_NUM_BEST_ROUTES_PER_GET];
348 
349 /* Bit mask to indicate which match or set terms
350  * are set in a route-map statement. Note that not all of these are supported. */
351 typedef enum
352 {
353  OPENR_RMAP_MATCH_AS_PATH = 0x1,
354  OPENR_RMAP_MATCH_COMMUNITY_LIST = 0x2,
355  OPENR_RMAP_MATCH_INTERFACE = 0x4,
356  OPENR_RMAP_MATCH_IP_ADDRESS = 0x8,
357  OPENR_RMAP_MATCH_IP_NEXT_HOP = 0x10,
358  OPENR_RMAP_MATCH_IP_ROUTE_SOURCE = 0x20,
359  OPENR_RMAP_MATCH_LENGTH = 0x40,
360  OPENR_RMAP_MATCH_METRIC = 0x80,
361  OPENR_RMAP_MATCH_METRIC_TYPE = 0x100,
362  OPENR_RMAP_MATCH_TAG = 0x200,
363 #ifdef L7_QOS_PACKAGE
364  OPENR_RMAP_MATCH_MAC_ACL = 0x400,
365 #endif /* L7_QOS_PACKAGE */
366  OPENR_RMAP_MATCH_EXTCOMMUNITY_LIST = 0x800,
367  OPENR_RMAP_MATCH_IPV6_ADDRESS = 0x1000,
368 
369  OPENR_RMAP_SET_AS_PATH = 0x1,
370  OPENR_RMAP_SET_AUTOMATIC_TAG = 0x2,
371  OPENR_RMAP_SET_COMMUNITY = 0x4,
372  OPENR_RMAP_SET_COMM_LIST_DELETE = 0x8,
373  OPENR_RMAP_SET_DEFAULT_INTF = 0x10,
374  OPENR_RMAP_SET_INTF = 0x20,
375  OPENR_RMAP_SET_IP_DEFAULT_NEXT_HOP = 0x40,
376  OPENR_RMAP_SET_IPV6_NEXT_HOP = 0x80,
377  OPENR_RMAP_SET_LEVEL = 0x100,
378  OPENR_RMAP_SET_LOCAL_PREF = 0x200,
379  OPENR_RMAP_SET_METRIC = 0x400,
380  OPENR_RMAP_SET_METRIC_TYPE = 0x800,
381  OPENR_RMAP_SET_NEXT_HOP = 0x1000,
382  OPENR_RMAP_SET_TAG = 0x2000,
383  OPENR_RMAP_SET_IP_TOS = 0x4000,
384  OPENR_RMAP_SET_IP_PREC = 0x8000,
385  OPENR_RMAP_SET_RT_EXTCOMMUNITY = 0x10000,
386  OPENR_RMAP_SET_SOO_EXTCOMMUNITY = 0x20000,
387  OPENR_RMAP_SET_EXTCOMM_LIST_DELETE = 0x40000,
388  OPENR_RMAP_SET_IPV6_DEFAULT_NEXT_HOP = 0x80000,
389  OPENR_RMAP_SET_IPV6_PREC = 0x100000,
390  OPENR_RMAP_SET_IP_UNCHANGED_NEXT_HOP = 0x200000,
391 } OPENR_RMAP_PARAMS_MASK_t;
392 
393 /* Route map match parameters. */
394 typedef struct openRmMatchParams_s
395 {
396  /* Bit-map to indicate what match params are set */
397  OPENR_RMAP_PARAMS_MASK_t matchParamsMask;
398 
399  /* To match any prefix, set the prefix and prefixLen to 0. */
400  open_inet_addr_t prefix;
401  uint32_t prefixLen;
402 
403  /* To match on the metric, metric-type (ospf type-1/type-2)
404  * and route tag */
405  uint32_t metric;
406  uint32_t metricType;
407  uint32_t tag;
409 
410 typedef struct openRmSetParams_s
411 {
412  /* Bit-map to indicate what set params are set */
413  OPENR_RMAP_PARAMS_MASK_t setParamsMask;
414 
415  /* metric value, if set */
416  uint32_t metric;
417 
418  /* metric type value, if set */
419  uint32_t metricType;
420 
421  /* tag value, if set */
422  uint32_t tag;
424 
425 /* Needed by openapi to get the results of the route-map policies for
426  * a given set of routes with match params */
428 {
429  openRoute_t route[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
430  openRmMatchParams_t matchParams[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
431  openRmSetParams_t setParams[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
433 
435 typedef struct openrIpv4Stats_s
436 {
437  uint64_t ipInReceives;
438  uint64_t ipInHdrErrors;
439  uint64_t ipInAddrErrors;
440  uint64_t ipForwDatagrams;
441  uint64_t ipInUnknownProtos;
442  uint64_t ipInDiscards;
443  uint64_t ipInDelivers;
444  uint64_t ipOutRequests;
445  uint64_t ipOutDiscards;
446  uint64_t ipNoRoutes;
447  uint64_t ipReasmTimeout;
448  uint64_t ipReasmReqds;
449  uint64_t ipReasmOKs;
450  uint64_t ipReasmFails;
451  uint64_t ipFragOKs;
452  uint64_t ipFragFails;
453  uint64_t ipFragCreates;
454  uint64_t ipRoutingDiscards;
455  uint64_t icmpInMsgs;
456  uint64_t icmpInErrors;
457  uint64_t icmpInDestUnreachs;
458  uint64_t icmpInTimeExcds;
459  uint64_t icmpInParmProbs;
460  uint64_t icmpInSrcQuenchs;
461  uint64_t icmpInRedirects;
462  uint64_t icmpInEchos;
463  uint64_t icmpInEchoReps;
464  uint64_t icmpInTimestamps;
465  uint64_t icmpInTimestampReps;
466  uint64_t icmpInAddrMasks;
467  uint64_t icmpInAddrMaskReps;
468  uint64_t icmpOutMsgs;
469  uint64_t icmpOutErrors;
470  uint64_t icmpOutDestUnreachs;
471  uint64_t icmpOutTimeExcds;
472  uint64_t icmpOutParmProbs;
473  uint64_t icmpOutSrcQuenchs;
474  uint64_t icmpOutRedirects;
475  uint64_t icmpOutEchos;
476  uint64_t icmpOutEchoReps;
477  uint64_t icmpOutTimestamps;
478  uint64_t icmpOutTimestampReps;
479  uint64_t icmpOutAddrMasks;
480  uint64_t icmpOutAddrMaskReps;
481 
483 
484 /* BFD Admin modes */
485 typedef enum
486 {
487  OPEN_BFD_DISABLE = 0,
488  OPEN_BFD_ENABLE = 1
489 } OPEN_BFD_ADMIN_MODE_t;
490 
491 /* BFD endpoint parameters used to initiate a session */
492 typedef struct openBfdEndpoint_s {
493  uint32_t compId; /* Id of component creating the session */
494  uint32_t vrfId; /* VRID associated with this BFD session */
495  uint32_t intIfNum; /* Interface associated with this session */
496  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
497  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
498  open_inet_addr_t nextHopIpAddr; /* NextHop IPv4 or Ipv6 address for Destination */
499  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
500  uint32_t type; /* Type of BFD encapsulation. */
501 
502  /* The BFD application can take the echo mode and BFD session timers from the
503  ** interface and global config or from the session setting. In order to use the session
504  ** settings set the override_config to 1.
505  ** The timer values are in milliseconds.
506  */
507  uint32_t override_config;
508  uint32_t bfdMinTx;
509  uint32_t bfdMinRx;
510  uint32_t bfdMultiplier;
511  uint32_t bfdEchoMode;
512  uint32_t bfdSlowTimer;
514 
515 
516 /* Maximum protocols allowed to Register with BFD */
517 #define OPEN_BFD_MAX_REG_PROT 2 /* BGP and OSPF */
518 
519 /* BFD session information */
520 #define OPEN_BFD_SESSION_ID_INVALID (~0)
521 
522 /* BFD session states */
523 typedef enum
524 {
525  OPEN_BFD_SESSION_STATE_ADMIN_DOWN = 0,
526  OPEN_BFD_SESSION_STATE_DOWN = 1,
527  OPEN_BFD_SESSION_STATE_INIT = 2,
528  OPEN_BFD_SESSION_STATE_UP = 3,
529 } OPEN_BFD_SESSION_STATE_t;
530 
531 /* BFD Diagnostic codes */
532 typedef enum {
533  OPEN_BFD_DIAG_CODE_NONE,
534  OPEN_BFD_DIAG_CODE_CTRL_DETECT_TIME_EXPIRED,
535  OPEN_BFD_DIAG_CODE_ECHO_FAILED,
536  OPEN_BFD_DIAG_CODE_NEIGHBOR_SIGNALED_SESSION_DOWN,
537  OPEN_BFD_DIAG_CODE_FORWARDING_PLANE_RESET,
538  OPEN_BFD_DIAG_CODE_PATH_DOWN,
539  OPEN_BFD_DIAG_CODE_CONCATENATED_PATH_DOWN,
540  OPEN_BFD_DIAG_CODE_ADMIN_DOWN,
541  OPEN_BFD_DIAG_CODE_REVERSE_CONCATENATED_PATH_DOWN,
542  OPEN_BFD_DIAG_CODE_MIS_CONNECTIVITY_DEFECT
543 } OPEN_BFD_DIAG_CODE_t;
544 
545 typedef enum {
546  OPEN_BFD_TUNNEL_TYPE_RAW, /* RAW UDP */
547  OPEN_BFD_TUNNEL_TYPE_UDP, /* BFD over IPv4/v6. */
548  OPEN_BFD_TUNNEL_TYPE_COUNT
549 } openBfdTunnelType_t;
550 
551 #define SYNCDB_OPENAPI_BFD "OpEN API BFD"
552 #define SYNCDB_OPENAPI_BFD_VERSION 1
553 
558 typedef struct openBfdSessionKey_s {
559  uint32_t intIfNum; /* Interface associated with this session */
560  uint32_t vrfId; /* VRID associated with this BFD session */
561  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
562  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
563  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
565 
568 typedef struct openBfdSessionInfo_s {
570  uint32_t session_id;
571  uint8_t version;
572  OPEN_BFD_SESSION_STATE_t state;
573  uint8_t flags;
574  OPEN_BFD_DIAG_CODE_t diag;
575  uint32_t authType;
576  uint32_t localDiscr;
577  uint32_t remoteDiscr;
578  uint32_t localMinTx;
579  uint32_t localMinRx;
580  uint8_t localDetectMult;
581  uint32_t remoteMinTx;
582  uint32_t remoteMinRx;
584  uint32_t actualTx;
585  uint32_t echoEnable;
586  uint32_t actualTxEcho;
587  uint32_t id[OPEN_BFD_MAX_REG_PROT];
589  openBfdTunnelType_t type;
590  uint32_t upTime;
592 
593 /* BFD session statistics */
594 typedef struct openBfdSessionStats_s {
595  uint32_t inPkts; /* BFD packets received. */
596  uint32_t outPkts; /* BFD packets transmitted. */
597  uint32_t dropPkts; /* Total BFD packets drop. */
598  uint32_t echoInPkts; /* BFD echo packets received. */
599  uint32_t echoOutPkts; /* BFD echo packets transmitted. */
601 
602 
603 /*****************************************************************/
636  uint32_t vrfId,
637  OPEN_AF_t addressFamily,
638  open_buffdesc *protoName,
639  open_buffdesc *protoCode,
640  uint32_t *protoId);
641 
642 /*****************************************************************/
678  OPEN_AF_t addressFamily,
679  uint32_t protoId,
680  open_buffdesc *routeTypeName,
681  open_buffdesc *routeTypeCode,
682  uint32_t *routeType);
683 
684 /*****************************************************************/
704  uint32_t vrfId,
705  uint32_t addressFamily,
706  uint32_t protoId);
707 
708 /*****************************************************************/
728  uint32_t addressFamily,
729  uint32_t routeType);
730 
731 /*****************************************************************/
748  OPEN_AF_t addressFamily,
749  uint32_t vrfId,
750  uint32_t protoId);
751 
752 /*****************************************************************/
769  OPEN_AF_t addressFamily,
770  uint32_t vrfId,
771  uint32_t protoId);
772 
773 /*****************************************************************/
795  uint32_t routeType,
796  open_buffdesc *protoName,
797  open_buffdesc *routeTypeName);
798 
799 /*****************************************************************/
817  uint32_t *protoNameLen);
818 
819 /*****************************************************************/
837  uint32_t *routeTypeNameLen);
838 
839 /*****************************************************************/
857  openRoute_t *routeEntry,
858  open_buffdesc *nextHopListBuff);
859 
860 /*****************************************************************/
881  openRoute_t *routeEntry,
882  open_buffdesc *nextHopListBuff);
883 
884 /*****************************************************************/
899  openRoute_t *routeEntry);
900 
901 
902 /*****************************************************************/
925  OPEN_AF_t family,
926  openRoute_t *routeEntry,
927  open_buffdesc *nextHopListBuff);
928 
929 /*****************************************************************/
953  OPEN_AF_t family,
954  uint32_t vrfId,
955  openRoute_t *openRoute,
956  open_buffdesc *nextHopListBuff);
957 
958 /*****************************************************************/
981  OPEN_AF_t family,
982  openRoute_t *route,
983  open_buffdesc *nextHopListBuff);
984 
985 /*****************************************************************/
1000  open_inet_addr_t destAddr,
1001  openRoute_t *route,
1002  open_buffdesc *nextHopListBuff);
1003 
1004 /*****************************************************************/
1020  open_inet_addr_t destPrefix,
1021  uint32_t pfxLen,
1022  openRoute_t *route,
1023  open_buffdesc *nextHopListBuff);
1024 /*****************************************************************/
1041  uint32_t vrfId,
1042  open_inet_addr_t destPrefix,
1043  uint32_t pfxLen,
1044  openRoute_t *route,
1045  open_buffdesc *nextHopListBuff);
1046 
1047 /*****************************************************************/
1068  uint32_t vrfId,
1069  open_inet_addr_t *nh_addr,
1070  open_buffdesc *mac,
1071  uint32_t cbParm1,
1072  uint32_t cbParm2,
1073  uint32_t cbParm3);
1074 
1075 /*****************************************************************/
1105  OPEN_AF_t family,
1106  uint32_t pid,
1107  uint32_t vrfId,
1108  open_buffdesc *clientName,
1109  uint32_t *clientId);
1110 
1111 /*****************************************************************/
1134  uint32_t clientId);
1135 
1136 /*****************************************************************/
1158  uint32_t clientId,
1159  OPEN_ROUTE_EVENT_t *chType,
1160  openRoute_t *route,
1161  open_buffdesc *nextHopListBuff);
1162 
1163 /*****************************************************************/
1183  uint32_t clientId,
1184  uint32_t numChanges,
1185  open_buffdesc *routeListBuff);
1186 
1187 /*****************************************************************/
1208  uint32_t clientId, uint32_t intIfNum,
1209  uint32_t numChanges,
1210  open_buffdesc *routeListBuff);
1211 
1212 /*****************************************************************/
1231  uint32_t *maxNextHops);
1232 
1233 /*****************************************************************/
1256  OPEN_AF_t family,
1257  uint32_t pid,
1258  uint32_t vrfId,
1259  open_buffdesc *clientName,
1260  uint32_t *clientId);
1261 
1262 /*****************************************************************/
1278  uint32_t vrfId,
1279  uint32_t clientId);
1280 
1281 /*****************************************************************/
1300  uint32_t vrfId,
1301  uint32_t clientId,
1302  uint32_t eventId);
1303 
1304 /*****************************************************************/
1321  uint32_t *routingIntfMax);
1322 
1323 /*****************************************************************/
1341  uint32_t vrfId,
1342  uint32_t intf,
1343  uint32_t *nextIntf);
1344 
1345 /*****************************************************************/
1362  uint32_t intf,
1363  uint32_t *nextIntf);
1364 
1365 /*****************************************************************/
1380  uint32_t intf,
1381  OPEN_INTF_TYPE_t *intfType);
1382 
1383 /*****************************************************************/
1400  uint32_t intIfNum,
1401  OPEN_BOOL_t *isUnnumbered);
1402 
1403 /*****************************************************************/
1423  uint32_t intIfNum, uint32_t *addr,
1424  uint32_t *mask);
1425 
1426 /*****************************************************************/
1441  uint32_t vrfId, open_buffdesc *vrfName);
1442 
1443 /*****************************************************************/
1460  open_buffdesc *vrfName,
1461  open_buffdesc *vrfNameNext);
1462 
1463 /*****************************************************************/
1479  open_buffdesc *vrfName,
1480  uint32_t *vrfId);
1481 
1482 /*****************************************************************/
1497  uint32_t intf,
1498  uint32_t *vlanId);
1499 
1500 /*****************************************************************/
1515  uint32_t intf,
1516  uint32_t *loopbackId);
1517 
1518 /*****************************************************************/
1533  uint32_t loopbackId,
1534  uint32_t *intf);
1535 
1536 /*****************************************************************/
1552  uint32_t *ifNameSize);
1553 
1554 /*****************************************************************/
1571  uint32_t intf,
1572  open_buffdesc *intfName);
1573 
1574 /*****************************************************************/
1589  uint32_t ifIndex, uint32_t *intIfNum);
1590 
1591 /*****************************************************************/
1606  uint32_t intf,
1607  uint32_t *ifIndex);
1608 
1609 /*****************************************************************/
1624  uint32_t intf,
1625  open_buffdesc *intfName);
1626 
1627 /*****************************************************************/
1643  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1644 
1645 /*****************************************************************/
1661  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1662 
1663 /*****************************************************************/
1678  uint32_t vrfId, open_buffdesc *intfName);
1679 
1680 /*****************************************************************/
1695  uint32_t intf,
1696  open_USP_t *usp);
1697 
1698 /*****************************************************************/
1713  uint32_t intf,
1714  open_buffdesc *mac);
1715 
1716 /*****************************************************************/
1733  OPEN_AF_t af,
1734  uint32_t intf,
1735  OPEN_CONTROL_t *ifState);
1736 
1737 /*****************************************************************/
1760  OPEN_AF_t af,
1761  uint32_t intf,
1762  open_inet_pfx_t *ipAddr);
1763 
1764 /*****************************************************************/
1788  OPEN_AF_t af,
1789  uint32_t intf,
1790  open_inet_pfx_t *ipAddr,
1791  uint32_t *index);
1792 
1793 /*****************************************************************/
1814  uint32_t intf,
1815  OPEN_INTF_IP_ADDR_METHOD_t *addrMethod,
1816  OPEN_CONTROL_t *clientIdEnable);
1817 
1818 /*****************************************************************/
1835  OPEN_AF_t af,
1836  uint32_t intf,
1837  uint32_t *ipMtu);
1838 
1839 /*****************************************************************/
1855  OPEN_AF_t af,
1856  uint32_t intf,
1857  uint32_t *bandwidth);
1858 
1859 /*****************************************************************/
1874  uint32_t intf,
1875  uint32_t *mode);
1876 
1877 /*****************************************************************/
1892  uint32_t intf,
1893  uint32_t *mode);
1894 
1895 /*****************************************************************/
1911  open_buffdesc *vrfName,
1912  uint32_t *burstSize,
1913  uint32_t *interval);
1914 
1915 /*****************************************************************/
1930  open_buffdesc *vrfName,
1931  uint32_t *mode);
1932 
1933 /*****************************************************************/
1948  OPEN_AF_t af,
1949  OPEN_CONTROL_t *enable);
1950 
1951 /*****************************************************************/
1985  OPEN_AF_t af,
1986  uint32_t *complete);
1987 
1988 /*****************************************************************/
2023  OPEN_AF_t af,
2024  uint32_t vrfId,
2025  uint32_t *complete);
2026 
2027 /*****************************************************************/
2047 int openapiRouteMapApply(openapiClientHandle_t *client_handle,
2048  open_buffdesc *routeMapName,
2049  openRmMatchParams_t *matchParams,
2050  openRmSetParams_t *setParams);
2051 
2052 /*****************************************************************/
2073  open_buffdesc *routeMapName,
2074  openRmMatchParams_t *matchParams,
2075  openRmSetParams_t *setParams,
2076  OPEN_FILTER_ACTION_t *action);
2077 
2078 /*****************************************************************/
2099  open_buffdesc *pfxListName,
2100  open_inet_addr_t prefix,
2101  uint32_t pfxLen);
2102 
2103 /*****************************************************************/
2135  open_buffdesc *clientName,
2136  uint32_t pid,
2137  uint32_t policyTypeMask,
2138  uint32_t *clientId);
2139 
2140 /*****************************************************************/
2158  uint32_t clientId,
2159  uint32_t seqNo);
2160 
2161 /*****************************************************************/
2177  OPEN_PREF_INDICES_t index,
2178  uint32_t *pref);
2179 
2180 /*****************************************************************/
2197  OPEN_PREF_INDICES_t index,
2198  uint32_t pref);
2199 
2200 /*****************************************************************/
2221  uint32_t protoId,
2222  open_buffdesc *protoName,
2223  uint32_t *nextProtoId);
2224 
2225 /*****************************************************************/
2241  OPEN_PREF_INDICES_t index,
2242  uint32_t *pref);
2243 
2244 /*****************************************************************/
2261  OPEN_PREF_INDICES_t index,
2262  uint32_t pref);
2263 
2264 /******* NEW OpENAPIs Added for virtual router support *************/
2265 
2266 /*****************************************************************/
2296  uint32_t vrfId,
2297  OPEN_AF_t family,
2298  uint32_t pid,
2299  open_buffdesc *clientName,
2300  uint32_t *clientId);
2301 
2302 /*****************************************************************/
2321  uint32_t vrfId,
2322  openRoute_t *routeEntry,
2323  open_buffdesc *nextHopListBuff);
2324 
2325 
2326 /**************************************************************************/
2337 open_error_t openapiBfdModeSet(OPEN_BFD_ADMIN_MODE_t mode);
2338 
2339 /*****************************************************************/
2354  openBfdEndpoint_t *ep,
2355  uint32_t *id);
2356 
2357 /*****************************************************************/
2372  openBfdEndpoint_t *ep,
2373  uint32_t id);
2374 
2375 /*****************************************************************/
2391  open_inet_addr_t peer,
2392  uint32_t *id);
2393 
2394 /*****************************************************************/
2410  uint32_t id,
2411  openBfdSessionInfo_t *info);
2412 
2413 /*****************************************************************/
2427  uint32_t id, openBfdSessionStats_t *stats);
2428 
2429 
2430 /*****************************************************************/
2449  uint32_t vrfId,
2450  openRoute_t *routeEntry,
2451  open_buffdesc *nextHopListBuff);
2452 
2453 /*****************************************************************/
2475  uint32_t vrfId,
2476  openRoute_t *routeEntry,
2477  open_buffdesc *nextHopListBuff);
2478 
2479 /*****************************************************************/
2496  uint32_t vrfId,
2497  openRoute_t *routeEntry,
2498  open_buffdesc *nextHopListBuff);
2499 
2500 /*****************************************************************/
2517  uint32_t vrfId,
2518  openRoute_t *routeEntry,
2519  open_buffdesc *nextHopListBuff);
2520 
2521 /*****************************************************************/
2536  uint32_t vrfId,
2537  uint32_t *rtoFreeRouteCount);
2538 
2539 /*****************************************************************/
2556  OPEN_AF_t af,
2557  uint32_t vrfId,
2558  OPEN_CONTROL_t *enable);
2559 
2560 /*****************************************************************/
2574  uint32_t *pval);
2575 
2576 /*****************************************************************/
2590  uint32_t *pval);
2591 
2592 /*****************************************************************/
2609  uint32_t vrfId,
2610  OPEN_NSF_PROTOCOL_t protocol);
2611 
2612 /*****************************************************************/
2630  uint32_t vrfId,
2631  OPEN_NSF_PROTOCOL_t protocol);
2632 
2633 /*****************************************************************/
2646  OPEN_BOOL_t *isBackupElected);
2647 
2648 /*****************************************************************/
2665  uint32_t intIfNum, uint32_t peerIp, OPEN_BOOL_t isAdd, uint32_t flag);
2666 
2667 /*****************************************************************/
2688  uint32_t vrfId,
2689  open_inet_addr_t *dest_addr,
2690  open_buffdesc *mac,
2691  int32_t stkIfIndex,
2692  uint16_t state);
2693 
2694 /*****************************************************************/
2712  uint32_t vrfId,
2713  open_inet_addr_t *dest_addr,
2714  int32_t stkIfIndex);
2715 
2716 /*****************************************************************/
2732  uint32_t vrfId,
2733  OPEN_PREF_INDICES_t index,
2734  uint32_t *pref);
2735 
2736 /*****************************************************************/
2751  openrIpv4Stats_t *ipv4Stats);
2752 
2753 /*****************************************************************/
2766  open_error_t
2768  uint32_t *defTTL);
2769 
2770 #endif /* OPENAPI_ROUTING_H_INCLUDED */
2771 
open_inet_addr_t nextHopIpAddr
NextHop IPv4 or Ipv6 address for Destination.
open_error_t openapiRtrAdminModeGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, OPEN_CONTROL_t *enable)
Get the current router admin mode given an address family.
open_error_t openapiExternalRoutesSaveRegister(openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t vrfId, uint32_t protoId)
Register with RTO to save External routes to SyncDB.
open_error_t openapiIpMapNsfRouteSource(openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_NSF_PROTOCOL_t protocol)
Indicate that a protocol intends to add routes to RTO following a warm restart.
open_error_t openapiRouteDelVr(openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Delete a route from the common routing table.
open_error_t openapiVrfNameNextGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, open_buffdesc *vrfNameNext)
Get the next VRF name.
uint32_t remoteDiscr
Remote discriminator.
uint32_t localDiscr
Local discriminator.
uint8_t discardRoute
if not 0, this is a discard route.
open_error_t openapiIpMapInitialRoutesDone(openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_NSF_PROTOCOL_t protocol)
A protocol that controls NSF routes calls this function to indicate it has updated RTO with all its i...
open_error_t openapiRtrIntfOperModeGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, OPEN_CONTROL_t *ifState)
Get the up/down status of the router interface given the address family.
open_error_t openapiRouteTypeDeregister(openapiClientHandle_t *client_handle, uint32_t addressFamily, uint32_t routeType)
Deregister a route type.
OPEN_MPLS_LFDB_PROTOCOL_t protocol
Protocol by which the label is created.
Definition: openapi_mpls.h:97
open_error_t openapiBestRouteChangeNextGetMult(openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t numChanges, open_buffdesc *routeListBuff)
Get the next best route change pending for a specific client.
struct openBfdSessionInfo_s openBfdSessionInfo_t
The BFD Session data.
open_error_t openapiRouteProtoNameLenMax(openapiClientHandle_t *client_handle, uint32_t *protoNameLen)
Get the maximum length of a protocol name.
open_error_t openapiRouterEventRegister(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t pid, uint32_t vrfId, open_buffdesc *clientName, uint32_t *clientId)
Register for routing events.
uint8_t rejectRoute
if not 0, this is a reject route.
OPEN_ROUTING_POLICY_CHANGE_t
Type of a policy change notification.
struct openrBestRouteChangeMsg_s openrBestRouteChangeMsg_t
Message structure for forwarding table change notifications.
open_error_t openapiBestRouteLookup(openapiClientHandle_t *client_handle, open_inet_addr_t destAddr, openRoute_t *route, open_buffdesc *nextHopListBuff)
Find the longest prefix match for a given destination IP address.
open_error_t openapiRtrIntfVlanIdGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *vlanId)
Get the vlan id on the configured router interface.
open_error_t openapiRtrICMPRatelimitGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *burstSize, uint32_t *interval)
Get the ICMP Ratelimit parameters.
open_error_t openapiRtrIpv4StatsGet(openapiClientHandle_t *client_handle, openrIpv4Stats_t *ipv4Stats)
Get the IPv4 statistics for the system.
open_error_t openapiRouterEventAcknowledge(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t clientId, uint32_t eventId)
Acknowledge a router event.
open_error_t openapiRtrICMPRedirectsModeGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *mode)
Get the ICMP Redirects mode of the interface.
open_error_t openapiRouteTypeRegister(openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t protoId, open_buffdesc *routeTypeName, open_buffdesc *routeTypeCode, uint32_t *routeType)
Register a new route type.
open_error_t openapiRouteModVr(openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Modify an existing route to the common routing table.
open_error_t openapiRtrIntfTypeGet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_INTF_TYPE_t *intfType)
Get the type of the interface for the given router interface.
open_error_t openapiIpDefaultTTLGet(openapiClientHandle_t *client_handle, uint32_t *defTTL)
Get the IP default TTL of the system.
open_error_t openapiRtrLoopbackIntIfNumGet(openapiClientHandle_t *client_handle, uint32_t loopbackId, uint32_t *intf)
Get the internal interface number of the loopback interface.
open_error_t openapiRoutingStartupStatus(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *complete)
Report whether IP routing has finished initialization for a given address family. ...
Policy has been deleted.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiRtrIntfNameGet(openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName)
Get the interface name of the configured router interface.
uint32_t actualTx
Negotiated tx value.
open_error_t openapiIntfBestRoutesNextGet(openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t intIfNum, uint32_t numChanges, open_buffdesc *routeListBuff)
Get the next set of best-routes on an interface for a specific client.
open_error_t openapiRoutingProtocolDeregister(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t addressFamily, uint32_t protoId)
Deregister a routing protocol.
open_inet_addr_t nhAddr
open_error_t openapiBfdSessionFind(openapiClientHandle_t *client_handle, open_inet_addr_t peer, uint32_t *id)
Get the BFD Session Identifier for a given peer by IP address.
open_error_t openapiIp6RouterPreferenceGet(openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t *pref)
Get IPv6 router preference associated with the specified protocol.
uint8_t pref
Route preference (also called administrative distance).
open_error_t openapiKernelArpAdd(openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *dest_addr, open_buffdesc *mac, int32_t stkIfIndex, uint16_t state)
Add the ARP entry.
open_error_t openapiPrefixFindVr(openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t destPrefix, uint32_t pfxLen, openRoute_t *route, open_buffdesc *nextHopListBuff)
Find the best route with a specific prefix.
Policy has been added or modified.
open_error_t openapiIpRouterPreferenceGet(openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t *pref)
Get router preference associated with the specified protocol.
open_error_t openapiKernelRouteAddVr(openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Add a kernel route to the common routing table.
open_error_t openapiMaxRoutingInterfacesGet(openapiClientHandle_t *client_handle, uint32_t *routingIntfMax)
Get the maximum number of OPEN routing interfaces.
OPEN_INTF_TYPE_t
uint32_t metric
Route metric.
open_error_t openapiRtoFreeRouteCountGet(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t *rtoFreeRouteCount)
Get the number of available routes in RTO for this VRF Id.
int openapiPrefixListApply(openapiClientHandle_t *client_handle, open_buffdesc *pfxListName, open_inet_addr_t prefix, uint32_t pfxLen)
Apply a prefix list with a given name to a given prefix.
open_error_t openapiPlatRtrRouteMaxEntriesGet(openapiClientHandle_t *client_handle, uint32_t *pval)
Get the number of IPv4 routes for this platform.
open_error_t openapiRouteNextGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, openRoute_t *route, open_buffdesc *nextHopListBuff)
Return next route in the routing table.
open_error_t openapiRtrIntfIpStackDrvNameGet(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, open_buffdesc *intfName)
Get the drv name of the configured router interface.
OPEN_ROUTING_POLICY_TYPE_t
These values must be powers of 2.
open_error_t openapiIntfBorrowedAddrAndMaskGet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t *addr, uint32_t *mask)
Get the borrowed address and mask for an unnnumbered interface.
open_error_t openapiIntfIpMtuGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, uint32_t *ipMtu)
Get the configured ipmtu value for the router interface given an address family.
openBfdTunnelType_t type
Type of BFD encapsulation RAW, UDP.
open_error_t openapiMaxNextHopsGet(openapiClientHandle_t *client_handle, uint32_t *maxNextHops)
Get the maximum number of next hops in an ECMP route.
open_error_t openapiRtrAdminModeGetVrf(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t vrfId, OPEN_CONTROL_t *enable)
Get the router admin mode of the VRF.
uint32_t echoEnable
Echo mode (0-Disabled, 1-Enabled)
uint8_t remoteDetectMult
Remote detection interval multiplier.
open_error_t openapiRtrIntfSecIpAddrGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, open_inet_pfx_t *ipAddr, uint32_t *index)
Get a Secondary IP address on a given router interface for a given address family.
open_error_t openapiKernelRouteDelVr(openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Delete a kernel route from the common routing table.
open_error_t openapiIpMapIsBackupElectedGet(openapiClientHandle_t *client_handle, OPEN_BOOL_t *isBackupElected)
Check if backup is elected.
uint8_t leakedRoute
Flag to indicate if this route is leaked from another VR.
OPEN_BFD_SESSION_STATE_t state
Local session state.
open_error_t openapiBestRouteEventRegisterVr(openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_AF_t family, uint32_t pid, open_buffdesc *clientName, uint32_t *clientId)
Register to be notified when there are changes to one or more routes used for IP forwarding.
uint8_t localDetectMult
Local detection interval multiplier.
uint32_t remoteMinRx
Required remote rx interval.
open_error_t openapiBestRouteEventRegister(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t pid, uint32_t vrfId, open_buffdesc *clientName, uint32_t *clientId)
Register to be notified when there are changes to one or more routes used for IP forwarding.
uint32_t remoteMinTx
Desired remote min tx interval.
uint32_t vrfId
VRF Identifier.
OPEN_AF_t
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
open_error_t openapiIpRouterPreferenceSet(openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t pref)
Set router preference associated with the specified protocol.
open_error_t openapiRouteTypeNameLenMax(openapiClientHandle_t *client_handle, uint32_t *routeTypeNameLen)
Get the maximum length of a protocol name.
open_error_t openapiIpRouterProtoNameNextGet(openapiClientHandle_t *client_handle, uint32_t protoId, open_buffdesc *protoName, uint32_t *nextProtoId)
Get the protocol name assigned to the associated protocol id.
uint16_t msgType
One of OPENR_MESSAGE_TYPE_t.
MPLS label stack.
open_error_t openapiBestRouteChangeNextGet(openapiClientHandle_t *client_handle, uint32_t clientId, OPEN_ROUTE_EVENT_t *chType, openRoute_t *route, open_buffdesc *nextHopListBuff)
Get the next best route change pending for a specific client.
open_error_t openapiBfdSessionInfoGet(openapiClientHandle_t *client_handle, uint32_t id, openBfdSessionInfo_t *info)
Get the BFD session information.
open_error_t openapiRtrICMPUnreachablesModeGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *mode)
Get the ICMP Unreachables mode of the interface.
open_error_t openapiRouteTypeInfoGet(openapiClientHandle_t *client_handle, uint32_t routeType, open_buffdesc *protoName, open_buffdesc *routeTypeName)
For a given route type, get the protocol and route type names.
open_error_t openapiRoutingStartupStatusVr(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t vrfId, uint32_t *complete)
Report whether IP routing has finished initialization in the requested VRF for a given address family...
uint32_t upTime
Session UP time.
#define OPEN_MAX_MPLS_IMPOSE_LABELS
Maximum MPLS impose lables.
uint32_t label[OPEN_MAX_MPLS_IMPOSE_LABELS]
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiIntfIsUnnumbered(openapiClientHandle_t *client_handle, uint32_t intIfNum, OPEN_BOOL_t *isUnnumbered)
Check if a given interface is unnumbered.
open_error_t openapiRoutingPolicyRegister(openapiClientHandle_t *client_handle, open_buffdesc *clientName, uint32_t pid, uint32_t policyTypeMask, uint32_t *clientId)
Register to be notified when there are routing policy changes.
open_error_t openapiBestRouteEventDeregister(openapiClientHandle_t *client_handle, uint32_t clientId)
Deregister for notifications when there are changes to one or more routes used for IP forwarding...
OPEN_PREF_INDICES_t
Route Preference Types.
uint32_t session_id
BFD Session ID.
struct openBfdSessionKey_s openBfdSessionKey_t
The key into the BFD database.
open_error_t openapiRouteMapFilter(openapiClientHandle_t *client_handle, open_buffdesc *routeMapName, openRmMatchParams_t *matchParams, openRmSetParams_t *setParams, OPEN_FILTER_ACTION_t *action)
Apply a route map with a given name to a route whose attributes are set in the matchParams (metric...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiUnnumberedPeerInfoSet(openapiClientHandle_t *client_handle, uint32_t intIfNum, uint32_t peerIp, OPEN_BOOL_t isAdd, uint32_t flag)
Set the Unnumbered peer info on an interface.
uint32_t protoId
Protocol ID assigned by FASTPATH to the routing protocol that added this route.
open_error_t openapiRoutingProtocolRegister(openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_AF_t addressFamily, open_buffdesc *protoName, open_buffdesc *protoCode, uint32_t *protoId)
Register a new routing protocol.
open_error_t openapiStackIfIndexIntIfNumGet(openapiClientHandle_t *client_handle, uint32_t ifIndex, uint32_t *intIfNum)
Get the interface number corresponding to the given ipstack ifIndex.
Manual configuration.
open_error_t openapiRtrIntfIpStackStkNameGet(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, open_buffdesc *intfName)
Get the stk name of the configured router interface.
open_error_t openapiRtrIntfIpStackIfNameGet(openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *intfName)
Get the name of the configured router interface.
uint32_t authType
Authentication type - not supported.
open_error_t openapiRtrIntfLoopbackIdGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *loopbackId)
Get the loopback id for the configured router interface.
open_error_t openapiBfdSessionCreate(openapiClientHandle_t *client_handle, openBfdEndpoint_t *ep, uint32_t *id)
Create a BFD Session.
uint32_t actualTxEcho
Negotiated tx echo value.
open_error_t openapiRouteMod(openapiClientHandle_t *client_handle, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Modify an existing route to the common routing table.
open_error_t openapiRtrIntfNextGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *nextIntf)
Get the next configured router interface.
openBfdSessionKey_t key
Unique BFD session identifier.
uint32_t localMinRx
Required local rx interval.
open_error_t openapiRtrICMPEchoReplyModeGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *mode)
Get the ICMP ignore echo-req mode.
open_error_t openapiIntfBandwidthGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, uint32_t *bandwidth)
Get the bandwidth value configure on the device ( ** to change **)
uint8_t version
BFD version.
open_error_t openapiPlatRtrRouteMaxEqualCostEntriesGet(openapiClientHandle_t *client_handle, uint32_t *pval)
Get the number of ECMP MAX PATHS FROM PLATFORM params.
open_error_t openapiRouterEventDeregister(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t clientId)
Deregister for routing events.
uint32_t clientId
Client ID given to client at registration time.
open_error_t openapiRtrIntfIpAddrGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t intf, open_inet_pfx_t *ipAddr)
Get an IP address on a given router interface for a given address family.
open_error_t openapiVrfNameToIdGet(openapiClientHandle_t *client_handle, open_buffdesc *vrfName, uint32_t *vrfId)
Get the VRF Identifier from VRF name.
The key into the BFD database.
uint16_t msgLen
Number of bytes in payload.
Leased through DHCP.
uint32_t numNextHops
Number of nexthops in the route.
uint32_t vrfId
VRF Id provided by the client at registration time.
struct openRoutePolicyResults_s openRoutePolicyResults_t
Message structure for fetching IPv4 statistics.
OPEN_ROUTE_EVENT_t
OPEN uses these 3 enumerators to indicate the addition, deletion, or change to the best route for a g...
open_error_t openapiRouteAddVr(openapiClientHandle_t *client_handle, uint32_t vrfId, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Add a route to the common routing table.
open_error_t openapiRouteDel(openapiClientHandle_t *client_handle, openRoute_t *routeEntry)
Delete a route from the common routing table.
open_error_t openapiVrfIntfNameGet(openapiClientHandle_t *client_handle, uint32_t vrfId, open_buffdesc *intfName)
Get the name of the configured VRF interface.
uint8_t routeType
Type of route.
open_inet_addr_t destPfx
Destination prefix and prefix length.
Message structure for forwarding table change notifications.
open_error_t openapiIntfNameSizeGet(openapiClientHandle_t *client_handle, uint32_t *ifNameSize)
Get the maximum length of an OPEN interface name.
open_error_t openapiRtrIntfNextGetVrf(openapiClientHandle_t *client_handle, uint32_t vrfId, uint32_t intf, uint32_t *nextIntf)
Get the next configured router interface.
The BFD Session data.
int openapiRouteMapApply(openapiClientHandle_t *client_handle, open_buffdesc *routeMapName, openRmMatchParams_t *matchParams, openRmSetParams_t *setParams)
Apply a route map with a given name to a route whose attributes are set in the matchParams argument...
open_error_t openapiRtrIntfL3MacAddressGet(openapiClientHandle_t *client_handle, uint32_t intf, open_buffdesc *mac)
Get the L3 MAC address of the router interface.
OPEN_INTF_IP_ADDR_METHOD_t
IP address configuration method.
open_error_t openapiPrefixFind(openapiClientHandle_t *client_handle, open_inet_addr_t destPrefix, uint32_t pfxLen, openRoute_t *route, open_buffdesc *nextHopListBuff)
Find the best route with a specific prefix.
open_error_t openapiIp6RouterPreferenceSet(openapiClientHandle_t *client_handle, OPEN_PREF_INDICES_t index, uint32_t pref)
Set IPV6 router preference associated with the specified protocol.
OPEN_BFD_DIAG_CODE_t diag
Local diagnostic code.
open_error_t openapiBfdModeSet(OPEN_BFD_ADMIN_MODE_t mode)
Set the BFD Global Admin Mode.
open_error_t openapiBfdSessionStatsGet(openapiClientHandle_t *client_handle, uint32_t id, openBfdSessionStats_t *stats)
Get the BFD statistics associated with the given session.
uint8_t flags
BFD flags.
open_error_t openapiRtrIntfIpStackIfIndexGet(openapiClientHandle_t *client_handle, uint32_t intf, uint32_t *ifIndex)
Get the ipstack ifIndex on the configured router interface.
open_error_t openapiBestRouteNextGetVr(openapiClientHandle_t *client_handle, OPEN_AF_t family, uint32_t vrfId, openRoute_t *openRoute, open_buffdesc *nextHopListBuff)
Return next best route in the specified VRF routing table.
open_error_t openapiPolicyChangeAck(openapiClientHandle_t *client_handle, uint32_t clientId, uint32_t seqNo)
Acknowledge receipt of a policy change notification.
open_error_t openapiVrfNameGet(openapiClientHandle_t *client_handle, uint32_t vrfId, open_buffdesc *vrfName)
Get the VRF name for a given VRF ID.
open_error_t openapiKernelArpDelete(openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *dest_addr, int32_t stkIfIndex)
Delete the ARP entry.
OPENR_MESSAGE_TYPE_t
Values that go in the Message Type field of event messages sent to applications.
open_error_t openapiBfdSessionDelete(openapiClientHandle_t *client_handle, openBfdEndpoint_t *ep, uint32_t id)
Delete a BFD Session.
open_error_t openapiRtrIntfUnitSlotPortGet(openapiClientHandle_t *client_handle, uint32_t intf, open_USP_t *usp)
Get the unit, slot and port of the router interface.
open_error_t openapiRouteAdd(openapiClientHandle_t *client_handle, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Add a route to the common routing table.
open_error_t openapiIpRouterPreferenceGetVr(openapiClientHandle_t *client_handle, uint32_t vrfId, OPEN_PREF_INDICES_t index, uint32_t *pref)
Get router preference associated with the specified protocol in a VRF.
uint32_t localMinTx
Desired local min tx interval.
open_error_t openapiRtrIntfIpAddrMethodGet(openapiClientHandle_t *client_handle, uint32_t intf, OPEN_INTF_IP_ADDR_METHOD_t *addrMethod, OPEN_CONTROL_t *clientIdEnable)
Get the method used to assign the IP address to a Router interface.
open_error_t openapiArpResolve(openapiClientHandle_t *client_handle, uint32_t vrfId, open_inet_addr_t *nh_addr, open_buffdesc *mac, uint32_t cbParm1, uint32_t cbParm2, uint32_t cbParm3)
Resolve ARP for the given IP Address.
open_error_t openapiExternalRoutesSaveDeRegister(openapiClientHandle_t *client_handle, OPEN_AF_t addressFamily, uint32_t vrfId, uint32_t protoId)
De-Register with RTO to save External routes to SyncDB.
open_error_t openapiBestRouteNextGet(openapiClientHandle_t *client_handle, OPEN_AF_t family, openRoute_t *routeEntry, open_buffdesc *nextHopListBuff)
Return next best route in the routing table.