Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_routing.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2022 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 
257  uint32_t label[OPEN_MAX_MPLS_IMPOSE_LABELS];
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 } openRoute_t;
317 
318 /*
319  * This structure defines a route change event. It contains the best route data,
320  * the operation being performed and the set of next hops. It also contains a flag
321  * that indicates whether more route changes are pending based on which a
322  * subsequent call can be made
323  */
324 typedef struct openRouteChange_s
325 {
326  /* The route itself */
327  openRoute_t route;
328 
329  /* operation being performed, change type */
330  uint8_t chType;
331 
332  /* The set of next hops, will assume the maximum value of all supported platforms here */
333  openNextHop_t nextHops[OPENR_PLAT_MAX_ECMP_NEXTHOPS];
334 
335  /* Is it valid, needed because an ip and mask of 0 are valid and cannot be checked against */
336  uint8_t valid;
337 
339 
340 /* Needed by openapi to be a structure as arrays cannot be handled over RPC */
341 typedef struct openRouteChangeList_s
342 {
343  openRouteChange_t routeChange[OPENR_NUM_BEST_ROUTES_PER_GET];
345 
346 /* Bit mask to indicate which match or set terms
347  * are set in a route-map statement. Note that not all of these are supported. */
348 typedef enum
349 {
350  OPENR_RMAP_MATCH_AS_PATH = 0x1,
351  OPENR_RMAP_MATCH_COMMUNITY_LIST = 0x2,
352  OPENR_RMAP_MATCH_INTERFACE = 0x4,
353  OPENR_RMAP_MATCH_IP_ADDRESS = 0x8,
354  OPENR_RMAP_MATCH_IP_NEXT_HOP = 0x10,
355  OPENR_RMAP_MATCH_IP_ROUTE_SOURCE = 0x20,
356  OPENR_RMAP_MATCH_LENGTH = 0x40,
357  OPENR_RMAP_MATCH_METRIC = 0x80,
358  OPENR_RMAP_MATCH_METRIC_TYPE = 0x100,
359  OPENR_RMAP_MATCH_TAG = 0x200,
360 #ifdef L7_QOS_PACKAGE
361  OPENR_RMAP_MATCH_MAC_ACL = 0x400,
362 #endif /* L7_QOS_PACKAGE */
363  OPENR_RMAP_MATCH_EXTCOMMUNITY_LIST = 0x800,
364  OPENR_RMAP_MATCH_IPV6_ADDRESS = 0x1000,
365 
366  OPENR_RMAP_SET_AS_PATH = 0x1,
367  OPENR_RMAP_SET_AUTOMATIC_TAG = 0x2,
368  OPENR_RMAP_SET_COMMUNITY = 0x4,
369  OPENR_RMAP_SET_COMM_LIST_DELETE = 0x8,
370  OPENR_RMAP_SET_DEFAULT_INTF = 0x10,
371  OPENR_RMAP_SET_INTF = 0x20,
372  OPENR_RMAP_SET_IP_DEFAULT_NEXT_HOP = 0x40,
373  OPENR_RMAP_SET_IPV6_NEXT_HOP = 0x80,
374  OPENR_RMAP_SET_LEVEL = 0x100,
375  OPENR_RMAP_SET_LOCAL_PREF = 0x200,
376  OPENR_RMAP_SET_METRIC = 0x400,
377  OPENR_RMAP_SET_METRIC_TYPE = 0x800,
378  OPENR_RMAP_SET_NEXT_HOP = 0x1000,
379  OPENR_RMAP_SET_TAG = 0x2000,
380  OPENR_RMAP_SET_IP_TOS = 0x4000,
381  OPENR_RMAP_SET_IP_PREC = 0x8000,
382  OPENR_RMAP_SET_RT_EXTCOMMUNITY = 0x10000,
383  OPENR_RMAP_SET_SOO_EXTCOMMUNITY = 0x20000,
384  OPENR_RMAP_SET_EXTCOMM_LIST_DELETE = 0x40000,
385  OPENR_RMAP_SET_IPV6_DEFAULT_NEXT_HOP = 0x80000,
386  OPENR_RMAP_SET_IPV6_PREC = 0x100000,
387  OPENR_RMAP_SET_IP_UNCHANGED_NEXT_HOP = 0x200000,
388 } OPENR_RMAP_PARAMS_MASK_t;
389 
390 /* Route map match parameters. */
391 typedef struct openRmMatchParams_s
392 {
393  /* Bit-map to indicate what match params are set */
394  OPENR_RMAP_PARAMS_MASK_t matchParamsMask;
395 
396  /* To match any prefix, set the prefix and prefixLen to 0. */
397  open_inet_addr_t prefix;
398  uint32_t prefixLen;
399 
400  /* To match on the metric, metric-type (ospf type-1/type-2)
401  * and route tag */
402  uint32_t metric;
403  uint32_t metricType;
404  uint32_t tag;
406 
407 typedef struct openRmSetParams_s
408 {
409  /* Bit-map to indicate what set params are set */
410  OPENR_RMAP_PARAMS_MASK_t setParamsMask;
411 
412  /* metric value, if set */
413  uint32_t metric;
414 
415  /* metric type value, if set */
416  uint32_t metricType;
417 
418  /* tag value, if set */
419  uint32_t tag;
421 
422 /* Needed by openapi to get the results of the route-map policies for
423  * a given set of routes with match params */
425 {
426  openRoute_t route[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
427  openRmMatchParams_t matchParams[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
428  openRmSetParams_t setParams[OPENR_NUM_ROUTES_CHECK_POLICY_ACTION];
430 
431 /* BFD Admin modes */
432 typedef enum
433 {
434  OPEN_BFD_DISABLE = 0,
435  OPEN_BFD_ENABLE = 1
436 } OPEN_BFD_ADMIN_MODE_t;
437 
438 /* BFD endpoint parameters used to initiate a session */
439 typedef struct openBfdEndpoint_s {
440  uint32_t compId; /* Id of component creating the session */
441  uint32_t vrfId; /* VRID associated with this BFD session */
442  uint32_t intIfNum; /* Interface associated with this session */
443  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
444  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
445  open_inet_addr_t nextHopIpAddr; /* NextHop IPv4 or Ipv6 address for Destination */
446  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
447  uint32_t type; /* Type of BFD encapsulation. */
448 
449  /* The BFD application can take the echo mode and BFD session timers from the
450  ** interface and global config or from the session setting. In order to use the session
451  ** settings set the override_config to 1.
452  ** The timer values are in milliseconds.
453  */
454  uint32_t override_config;
455  uint32_t bfdMinTx;
456  uint32_t bfdMinRx;
457  uint32_t bfdMultiplier;
458  uint32_t bfdEchoMode;
459  uint32_t bfdSlowTimer;
461 
462 
463 /* Maximum protocols allowed to Register with BFD */
464 #define OPEN_BFD_MAX_REG_PROT 2 /* BGP and OSPF */
465 
466 /* BFD session information */
467 #define OPEN_BFD_SESSION_ID_INVALID (~0)
468 
469 /* BFD session states */
470 typedef enum
471 {
472  OPEN_BFD_SESSION_STATE_ADMIN_DOWN = 0,
473  OPEN_BFD_SESSION_STATE_DOWN = 1,
474  OPEN_BFD_SESSION_STATE_INIT = 2,
475  OPEN_BFD_SESSION_STATE_UP = 3,
476 } OPEN_BFD_SESSION_STATE_t;
477 
478 /* BFD Diagnostic codes */
479 typedef enum {
480  OPEN_BFD_DIAG_CODE_NONE,
481  OPEN_BFD_DIAG_CODE_CTRL_DETECT_TIME_EXPIRED,
482  OPEN_BFD_DIAG_CODE_ECHO_FAILED,
483  OPEN_BFD_DIAG_CODE_NEIGHBOR_SIGNALED_SESSION_DOWN,
484  OPEN_BFD_DIAG_CODE_FORWARDING_PLANE_RESET,
485  OPEN_BFD_DIAG_CODE_PATH_DOWN,
486  OPEN_BFD_DIAG_CODE_CONCATENATED_PATH_DOWN,
487  OPEN_BFD_DIAG_CODE_ADMIN_DOWN,
488  OPEN_BFD_DIAG_CODE_REVERSE_CONCATENATED_PATH_DOWN,
489  OPEN_BFD_DIAG_CODE_MIS_CONNECTIVITY_DEFECT
490 } OPEN_BFD_DIAG_CODE_t;
491 
492 typedef enum {
493  OPEN_BFD_TUNNEL_TYPE_RAW, /* RAW UDP */
494  OPEN_BFD_TUNNEL_TYPE_UDP, /* BFD over IPv4/v6. */
495  OPEN_BFD_TUNNEL_TYPE_COUNT
496 } openBfdTunnelType_t;
497 
498 #define SYNCDB_OPENAPI_BFD "OpEN API BFD"
499 #define SYNCDB_OPENAPI_BFD_VERSION 1
500 
505 typedef struct openBfdSessionKey_s {
506  uint32_t intIfNum; /* Interface associated with this session */
507  uint32_t vrfId; /* VRID associated with this BFD session */
508  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
509  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
510  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
512 
515 typedef struct openBfdSessionInfo_s {
517  uint32_t session_id;
518  uint8_t version;
519  OPEN_BFD_SESSION_STATE_t state;
520  uint8_t flags;
521  OPEN_BFD_DIAG_CODE_t diag;
522  uint32_t authType;
523  uint32_t localDiscr;
524  uint32_t remoteDiscr;
525  uint32_t localMinTx;
526  uint32_t localMinRx;
527  uint8_t localDetectMult;
528  uint32_t remoteMinTx;
529  uint32_t remoteMinRx;
531  uint32_t actualTx;
532  uint32_t echoEnable;
533  uint32_t actualTxEcho;
534  uint32_t id[OPEN_BFD_MAX_REG_PROT];
536  openBfdTunnelType_t type;
537  uint32_t upTime;
539 
540 /* BFD session statistics */
541 typedef struct openBfdSessionStats_s {
542  uint32_t inPkts; /* BFD packets received. */
543  uint32_t outPkts; /* BFD packets transmitted. */
544  uint32_t dropPkts; /* Total BFD packets drop. */
545  uint32_t echoInPkts; /* BFD echo packets received. */
546  uint32_t echoOutPkts; /* BFD echo packets transmitted. */
548 
549 
550 /*****************************************************************/
583  uint32_t vrfId,
584  OPEN_AF_t addressFamily,
585  open_buffdesc *protoName,
586  open_buffdesc *protoCode,
587  uint32_t *protoId);
588 
589 /*****************************************************************/
625  OPEN_AF_t addressFamily,
626  uint32_t protoId,
627  open_buffdesc *routeTypeName,
628  open_buffdesc *routeTypeCode,
629  uint32_t *routeType);
630 
631 /*****************************************************************/
651  uint32_t vrfId,
652  uint32_t addressFamily,
653  uint32_t protoId);
654 
655 /*****************************************************************/
675  uint32_t addressFamily,
676  uint32_t routeType);
677 
678 /*****************************************************************/
695  OPEN_AF_t addressFamily,
696  uint32_t vrfId,
697  uint32_t protoId);
698 
699 /*****************************************************************/
716  OPEN_AF_t addressFamily,
717  uint32_t vrfId,
718  uint32_t protoId);
719 
720 /*****************************************************************/
742  uint32_t routeType,
743  open_buffdesc *protoName,
744  open_buffdesc *routeTypeName);
745 
746 /*****************************************************************/
764  uint32_t *protoNameLen);
765 
766 /*****************************************************************/
784  uint32_t *routeTypeNameLen);
785 
786 /*****************************************************************/
804  openRoute_t *routeEntry,
805  open_buffdesc *nextHopListBuff);
806 
807 /*****************************************************************/
828  openRoute_t *routeEntry,
829  open_buffdesc *nextHopListBuff);
830 
831 /*****************************************************************/
846  openRoute_t *routeEntry);
847 
848 
849 /*****************************************************************/
872  OPEN_AF_t family,
873  openRoute_t *routeEntry,
874  open_buffdesc *nextHopListBuff);
875 
876 /*****************************************************************/
900  OPEN_AF_t family,
901  uint32_t vrfId,
902  openRoute_t *openRoute,
903  open_buffdesc *nextHopListBuff);
904 
905 /*****************************************************************/
928  OPEN_AF_t family,
929  openRoute_t *route,
930  open_buffdesc *nextHopListBuff);
931 
932 /*****************************************************************/
947  open_inet_addr_t destAddr,
948  openRoute_t *route,
949  open_buffdesc *nextHopListBuff);
950 
951 /*****************************************************************/
967  open_inet_addr_t destPrefix,
968  uint32_t pfxLen,
969  openRoute_t *route,
970  open_buffdesc *nextHopListBuff);
971 /*****************************************************************/
987  uint32_t vrfId,
988  open_inet_addr_t destPrefix,
989  uint32_t pfxLen,
990  openRoute_t *route,
991  open_buffdesc *nextHopListBuff);
992 
993 /*****************************************************************/
1010  uint32_t vrfId,
1011  open_inet_addr_t *nh_addr,
1012  open_buffdesc *mac,
1013  uint32_t cbParm1,
1014  uint32_t cbParm2,
1015  uint32_t cbParm3);
1016 
1017 /*****************************************************************/
1047  OPEN_AF_t family,
1048  uint32_t pid,
1049  uint32_t vrfId,
1050  open_buffdesc *clientName,
1051  uint32_t *clientId);
1052 
1053 /*****************************************************************/
1076  uint32_t clientId);
1077 
1078 /*****************************************************************/
1100  uint32_t clientId,
1101  OPEN_ROUTE_EVENT_t *chType,
1102  openRoute_t *route,
1103  open_buffdesc *nextHopListBuff);
1104 
1105 /*****************************************************************/
1125  uint32_t clientId,
1126  uint32_t numChanges,
1127  open_buffdesc *routeListBuff);
1128 
1129 /*****************************************************************/
1150  uint32_t clientId, uint32_t intIfNum,
1151  uint32_t numChanges,
1152  open_buffdesc *routeListBuff);
1153 
1154 /*****************************************************************/
1173  uint32_t *maxNextHops);
1174 
1175 /*****************************************************************/
1198  OPEN_AF_t family,
1199  uint32_t pid,
1200  uint32_t vrfId,
1201  open_buffdesc *clientName,
1202  uint32_t *clientId);
1203 
1204 /*****************************************************************/
1220  uint32_t vrfId,
1221  uint32_t clientId);
1222 
1223 /*****************************************************************/
1242  uint32_t vrfId,
1243  uint32_t clientId,
1244  uint32_t eventId);
1245 
1246 /*****************************************************************/
1263  uint32_t *routingIntfMax);
1264 
1265 /*****************************************************************/
1283  uint32_t vrfId,
1284  uint32_t intf,
1285  uint32_t *nextIntf);
1286 
1287 /*****************************************************************/
1304  uint32_t intf,
1305  uint32_t *nextIntf);
1306 
1307 /*****************************************************************/
1322  uint32_t intf,
1323  OPEN_INTF_TYPE_t *intfType);
1324 
1325 /*****************************************************************/
1342  uint32_t intIfNum,
1343  OPEN_BOOL_t *isUnnumbered);
1344 
1345 /*****************************************************************/
1365  uint32_t intIfNum, uint32_t *addr,
1366  uint32_t *mask);
1367 
1368 /*****************************************************************/
1383  uint32_t vrfId, open_buffdesc *vrfName);
1384 
1385 /*****************************************************************/
1402  open_buffdesc *vrfName,
1403  open_buffdesc *vrfNameNext);
1404 
1405 /*****************************************************************/
1421  open_buffdesc *vrfName,
1422  uint32_t *vrfId);
1423 
1424 /*****************************************************************/
1439  uint32_t intf,
1440  uint32_t *vlanId);
1441 
1442 /*****************************************************************/
1457  uint32_t intf,
1458  uint32_t *loopbackId);
1459 
1460 /*****************************************************************/
1475  uint32_t loopbackId,
1476  uint32_t *intf);
1477 
1478 /*****************************************************************/
1494  uint32_t *ifNameSize);
1495 
1496 /*****************************************************************/
1513  uint32_t intf,
1514  open_buffdesc *intfName);
1515 
1516 /*****************************************************************/
1531  uint32_t ifIndex, uint32_t *intIfNum);
1532 
1533 /*****************************************************************/
1548  uint32_t intf,
1549  uint32_t *ifIndex);
1550 
1551 /*****************************************************************/
1566  uint32_t intf,
1567  open_buffdesc *intfName);
1568 
1569 /*****************************************************************/
1585  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1586 
1587 /*****************************************************************/
1603  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1604 
1605 /*****************************************************************/
1620  uint32_t vrfId, open_buffdesc *intfName);
1621 
1622 /*****************************************************************/
1637  uint32_t intf,
1638  open_USP_t *usp);
1639 
1640 /*****************************************************************/
1655  uint32_t intf,
1656  open_buffdesc *mac);
1657 
1658 /*****************************************************************/
1675  OPEN_AF_t af,
1676  uint32_t intf,
1677  OPEN_CONTROL_t *ifState);
1678 
1679 /*****************************************************************/
1702  OPEN_AF_t af,
1703  uint32_t intf,
1704  open_inet_pfx_t *ipAddr);
1705 
1706 /*****************************************************************/
1730  OPEN_AF_t af,
1731  uint32_t intf,
1732  open_inet_pfx_t *ipAddr,
1733  uint32_t *index);
1734 
1735 /*****************************************************************/
1756  uint32_t intf,
1757  OPEN_INTF_IP_ADDR_METHOD_t *addrMethod,
1758  OPEN_CONTROL_t *clientIdEnable);
1759 
1760 /*****************************************************************/
1777  OPEN_AF_t af,
1778  uint32_t intf,
1779  uint32_t *ipMtu);
1780 
1781 /*****************************************************************/
1797  OPEN_AF_t af,
1798  uint32_t intf,
1799  uint32_t *bandwidth);
1800 
1801 /*****************************************************************/
1816  uint32_t intf,
1817  uint32_t *mode);
1818 
1819 /*****************************************************************/
1834  uint32_t intf,
1835  uint32_t *mode);
1836 
1837 /*****************************************************************/
1853  open_buffdesc *vrfName,
1854  uint32_t *burstSize,
1855  uint32_t *interval);
1856 
1857 /*****************************************************************/
1872  open_buffdesc *vrfName,
1873  uint32_t *mode);
1874 
1875 /*****************************************************************/
1890  OPEN_AF_t af,
1891  OPEN_CONTROL_t *enable);
1892 
1893 /*****************************************************************/
1927  OPEN_AF_t af,
1928  uint32_t *complete);
1929 
1930 /*****************************************************************/
1965  OPEN_AF_t af,
1966  uint32_t vrfId,
1967  uint32_t *complete);
1968 
1969 /*****************************************************************/
1989 int openapiRouteMapApply(openapiClientHandle_t *client_handle,
1990  open_buffdesc *routeMapName,
1991  openRmMatchParams_t *matchParams,
1992  openRmSetParams_t *setParams);
1993 
1994 /*****************************************************************/
2015  open_buffdesc *routeMapName,
2016  openRmMatchParams_t *matchParams,
2017  openRmSetParams_t *setParams,
2018  OPEN_FILTER_ACTION_t *action);
2019 
2020 /*****************************************************************/
2041  open_buffdesc *pfxListName,
2042  open_inet_addr_t prefix,
2043  uint32_t pfxLen);
2044 
2045 /*****************************************************************/
2077  open_buffdesc *clientName,
2078  uint32_t pid,
2079  uint32_t policyTypeMask,
2080  uint32_t *clientId);
2081 
2082 /*****************************************************************/
2100  uint32_t clientId,
2101  uint32_t seqNo);
2102 
2103 /*****************************************************************/
2119  OPEN_PREF_INDICES_t index,
2120  uint32_t *pref);
2121 
2122 /*****************************************************************/
2139  OPEN_PREF_INDICES_t index,
2140  uint32_t pref);
2141 
2142 /*****************************************************************/
2163  uint32_t protoId,
2164  open_buffdesc *protoName,
2165  uint32_t *nextProtoId);
2166 
2167 /*****************************************************************/
2183  OPEN_PREF_INDICES_t index,
2184  uint32_t *pref);
2185 
2186 /*****************************************************************/
2203  OPEN_PREF_INDICES_t index,
2204  uint32_t pref);
2205 
2206 /******* NEW OpENAPIs Added for virtual router support *************/
2207 
2208 /*****************************************************************/
2238  uint32_t vrfId,
2239  OPEN_AF_t family,
2240  uint32_t pid,
2241  open_buffdesc *clientName,
2242  uint32_t *clientId);
2243 
2244 /*****************************************************************/
2263  uint32_t vrfId,
2264  openRoute_t *routeEntry,
2265  open_buffdesc *nextHopListBuff);
2266 
2267 
2268 /**************************************************************************/
2279 open_error_t openapiBfdModeSet(OPEN_BFD_ADMIN_MODE_t mode);
2280 
2281 /*****************************************************************/
2296  openBfdEndpoint_t *ep,
2297  uint32_t *id);
2298 
2299 /*****************************************************************/
2314  openBfdEndpoint_t *ep,
2315  uint32_t id);
2316 
2317 /*****************************************************************/
2333  open_inet_addr_t peer,
2334  uint32_t *id);
2335 
2336 /*****************************************************************/
2352  uint32_t id,
2353  openBfdSessionInfo_t *info);
2354 
2355 /*****************************************************************/
2369  uint32_t id, openBfdSessionStats_t *stats);
2370 
2371 
2372 /*****************************************************************/
2391  uint32_t vrfId,
2392  openRoute_t *routeEntry,
2393  open_buffdesc *nextHopListBuff);
2394 
2395 /*****************************************************************/
2417  uint32_t vrfId,
2418  openRoute_t *routeEntry,
2419  open_buffdesc *nextHopListBuff);
2420 
2421 /*****************************************************************/
2437  uint32_t vrfId,
2438  openRoute_t *routeEntry,
2439  open_buffdesc *nextHopListBuff);
2440 
2441 /*****************************************************************/
2457  uint32_t vrfId,
2458  openRoute_t *routeEntry,
2459  open_buffdesc *nextHopListBuff);
2460 
2461 /*****************************************************************/
2476  uint32_t vrfId,
2477  uint32_t *rtoFreeRouteCount);
2478 
2479 /*****************************************************************/
2496  OPEN_AF_t af,
2497  uint32_t vrfId,
2498  OPEN_CONTROL_t *enable);
2499 
2500 /*****************************************************************/
2514  uint32_t *pval);
2515 
2516 /*****************************************************************/
2530  uint32_t *pval);
2531 
2532 /*****************************************************************/
2549  uint32_t vrfId,
2550  OPEN_NSF_PROTOCOL_t protocol);
2551 
2552 /*****************************************************************/
2570  uint32_t vrfId,
2571  OPEN_NSF_PROTOCOL_t protocol);
2572 
2573 /*****************************************************************/
2586  OPEN_BOOL_t *isBackupElected);
2587 
2588 /*****************************************************************/
2605  uint32_t intIfNum, uint32_t peerIp, OPEN_BOOL_t isAdd, uint32_t flag);
2606 
2607 /*****************************************************************/
2628  uint32_t vrfId,
2629  open_inet_addr_t *dest_addr,
2630  open_buffdesc *mac,
2631  int32_t stkIfIndex,
2632  uint16_t state);
2633 
2634 /*****************************************************************/
2652  uint32_t vrfId,
2653  open_inet_addr_t *dest_addr,
2654  int32_t stkIfIndex);
2655 
2656 /*****************************************************************/
2672  uint32_t vrfId,
2673  OPEN_PREF_INDICES_t index,
2674  uint32_t *pref);
2675 
2676 #endif /* OPENAPI_ROUTING_H_INCLUDED */
2677 
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:105
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 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 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.
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.
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.
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.