Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
openapi_routing.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2023 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 **********************************************************************
26 *
27 * @filename openapi_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 
432 typedef struct openrIpv4Stats_s
433 {
434  uint64_t ipInReceives;
435  uint64_t ipInHdrErrors;
436  uint64_t ipInAddrErrors;
437  uint64_t ipForwDatagrams;
438  uint64_t ipInUnknownProtos;
439  uint64_t ipInDiscards;
440  uint64_t ipInDelivers;
441  uint64_t ipOutRequests;
442  uint64_t ipOutDiscards;
443  uint64_t ipNoRoutes;
444  uint64_t ipReasmTimeout;
445  uint64_t ipReasmReqds;
446  uint64_t ipReasmOKs;
447  uint64_t ipReasmFails;
448  uint64_t ipFragOKs;
449  uint64_t ipFragFails;
450  uint64_t ipFragCreates;
451  uint64_t ipRoutingDiscards;
452  uint64_t icmpInMsgs;
453  uint64_t icmpInErrors;
454  uint64_t icmpInDestUnreachs;
455  uint64_t icmpInTimeExcds;
456  uint64_t icmpInParmProbs;
457  uint64_t icmpInSrcQuenchs;
458  uint64_t icmpInRedirects;
459  uint64_t icmpInEchos;
460  uint64_t icmpInEchoReps;
461  uint64_t icmpInTimestamps;
462  uint64_t icmpInTimestampReps;
463  uint64_t icmpInAddrMasks;
464  uint64_t icmpInAddrMaskReps;
465  uint64_t icmpOutMsgs;
466  uint64_t icmpOutErrors;
467  uint64_t icmpOutDestUnreachs;
468  uint64_t icmpOutTimeExcds;
469  uint64_t icmpOutParmProbs;
470  uint64_t icmpOutSrcQuenchs;
471  uint64_t icmpOutRedirects;
472  uint64_t icmpOutEchos;
473  uint64_t icmpOutEchoReps;
474  uint64_t icmpOutTimestamps;
475  uint64_t icmpOutTimestampReps;
476  uint64_t icmpOutAddrMasks;
477  uint64_t icmpOutAddrMaskReps;
478 
480 
481 /* BFD Admin modes */
482 typedef enum
483 {
484  OPEN_BFD_DISABLE = 0,
485  OPEN_BFD_ENABLE = 1
486 } OPEN_BFD_ADMIN_MODE_t;
487 
488 /* BFD endpoint parameters used to initiate a session */
489 typedef struct openBfdEndpoint_s {
490  uint32_t compId; /* Id of component creating the session */
491  uint32_t vrfId; /* VRID associated with this BFD session */
492  uint32_t intIfNum; /* Interface associated with this session */
493  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
494  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
495  open_inet_addr_t nextHopIpAddr; /* NextHop IPv4 or Ipv6 address for Destination */
496  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
497  uint32_t type; /* Type of BFD encapsulation. */
498 
499  /* The BFD application can take the echo mode and BFD session timers from the
500  ** interface and global config or from the session setting. In order to use the session
501  ** settings set the override_config to 1.
502  ** The timer values are in milliseconds.
503  */
504  uint32_t override_config;
505  uint32_t bfdMinTx;
506  uint32_t bfdMinRx;
507  uint32_t bfdMultiplier;
508  uint32_t bfdEchoMode;
509  uint32_t bfdSlowTimer;
511 
512 
513 /* Maximum protocols allowed to Register with BFD */
514 #define OPEN_BFD_MAX_REG_PROT 2 /* BGP and OSPF */
515 
516 /* BFD session information */
517 #define OPEN_BFD_SESSION_ID_INVALID (~0)
518 
519 /* BFD session states */
520 typedef enum
521 {
522  OPEN_BFD_SESSION_STATE_ADMIN_DOWN = 0,
523  OPEN_BFD_SESSION_STATE_DOWN = 1,
524  OPEN_BFD_SESSION_STATE_INIT = 2,
525  OPEN_BFD_SESSION_STATE_UP = 3,
526 } OPEN_BFD_SESSION_STATE_t;
527 
528 /* BFD Diagnostic codes */
529 typedef enum {
530  OPEN_BFD_DIAG_CODE_NONE,
531  OPEN_BFD_DIAG_CODE_CTRL_DETECT_TIME_EXPIRED,
532  OPEN_BFD_DIAG_CODE_ECHO_FAILED,
533  OPEN_BFD_DIAG_CODE_NEIGHBOR_SIGNALED_SESSION_DOWN,
534  OPEN_BFD_DIAG_CODE_FORWARDING_PLANE_RESET,
535  OPEN_BFD_DIAG_CODE_PATH_DOWN,
536  OPEN_BFD_DIAG_CODE_CONCATENATED_PATH_DOWN,
537  OPEN_BFD_DIAG_CODE_ADMIN_DOWN,
538  OPEN_BFD_DIAG_CODE_REVERSE_CONCATENATED_PATH_DOWN,
539  OPEN_BFD_DIAG_CODE_MIS_CONNECTIVITY_DEFECT
540 } OPEN_BFD_DIAG_CODE_t;
541 
542 typedef enum {
543  OPEN_BFD_TUNNEL_TYPE_RAW, /* RAW UDP */
544  OPEN_BFD_TUNNEL_TYPE_UDP, /* BFD over IPv4/v6. */
545  OPEN_BFD_TUNNEL_TYPE_COUNT
546 } openBfdTunnelType_t;
547 
548 #define SYNCDB_OPENAPI_BFD "OpEN API BFD"
549 #define SYNCDB_OPENAPI_BFD_VERSION 1
550 
555 typedef struct openBfdSessionKey_s {
556  uint32_t intIfNum; /* Interface associated with this session */
557  uint32_t vrfId; /* VRID associated with this BFD session */
558  open_inet_addr_t srcIpAddr; /* Source IPv4 or Ipv6 address */
559  open_inet_addr_t dstIpAddr; /* Destination IPv4 or Ipv6 address */
560  OPEN_MPLS_LABELS_t mpls_label; /* MPLS Label Stack */
562 
565 typedef struct openBfdSessionInfo_s {
567  uint32_t session_id;
568  uint8_t version;
569  OPEN_BFD_SESSION_STATE_t state;
570  uint8_t flags;
571  OPEN_BFD_DIAG_CODE_t diag;
572  uint32_t authType;
573  uint32_t localDiscr;
574  uint32_t remoteDiscr;
575  uint32_t localMinTx;
576  uint32_t localMinRx;
577  uint8_t localDetectMult;
578  uint32_t remoteMinTx;
579  uint32_t remoteMinRx;
581  uint32_t actualTx;
582  uint32_t echoEnable;
583  uint32_t actualTxEcho;
584  uint32_t id[OPEN_BFD_MAX_REG_PROT];
586  openBfdTunnelType_t type;
587  uint32_t upTime;
589 
590 /* BFD session statistics */
591 typedef struct openBfdSessionStats_s {
592  uint32_t inPkts; /* BFD packets received. */
593  uint32_t outPkts; /* BFD packets transmitted. */
594  uint32_t dropPkts; /* Total BFD packets drop. */
595  uint32_t echoInPkts; /* BFD echo packets received. */
596  uint32_t echoOutPkts; /* BFD echo packets transmitted. */
598 
599 
600 /*****************************************************************/
633  uint32_t vrfId,
634  OPEN_AF_t addressFamily,
635  open_buffdesc *protoName,
636  open_buffdesc *protoCode,
637  uint32_t *protoId);
638 
639 /*****************************************************************/
675  OPEN_AF_t addressFamily,
676  uint32_t protoId,
677  open_buffdesc *routeTypeName,
678  open_buffdesc *routeTypeCode,
679  uint32_t *routeType);
680 
681 /*****************************************************************/
701  uint32_t vrfId,
702  uint32_t addressFamily,
703  uint32_t protoId);
704 
705 /*****************************************************************/
725  uint32_t addressFamily,
726  uint32_t routeType);
727 
728 /*****************************************************************/
745  OPEN_AF_t addressFamily,
746  uint32_t vrfId,
747  uint32_t protoId);
748 
749 /*****************************************************************/
766  OPEN_AF_t addressFamily,
767  uint32_t vrfId,
768  uint32_t protoId);
769 
770 /*****************************************************************/
792  uint32_t routeType,
793  open_buffdesc *protoName,
794  open_buffdesc *routeTypeName);
795 
796 /*****************************************************************/
814  uint32_t *protoNameLen);
815 
816 /*****************************************************************/
834  uint32_t *routeTypeNameLen);
835 
836 /*****************************************************************/
854  openRoute_t *routeEntry,
855  open_buffdesc *nextHopListBuff);
856 
857 /*****************************************************************/
878  openRoute_t *routeEntry,
879  open_buffdesc *nextHopListBuff);
880 
881 /*****************************************************************/
896  openRoute_t *routeEntry);
897 
898 
899 /*****************************************************************/
922  OPEN_AF_t family,
923  openRoute_t *routeEntry,
924  open_buffdesc *nextHopListBuff);
925 
926 /*****************************************************************/
950  OPEN_AF_t family,
951  uint32_t vrfId,
952  openRoute_t *openRoute,
953  open_buffdesc *nextHopListBuff);
954 
955 /*****************************************************************/
978  OPEN_AF_t family,
979  openRoute_t *route,
980  open_buffdesc *nextHopListBuff);
981 
982 /*****************************************************************/
997  open_inet_addr_t destAddr,
998  openRoute_t *route,
999  open_buffdesc *nextHopListBuff);
1000 
1001 /*****************************************************************/
1017  open_inet_addr_t destPrefix,
1018  uint32_t pfxLen,
1019  openRoute_t *route,
1020  open_buffdesc *nextHopListBuff);
1021 /*****************************************************************/
1038  uint32_t vrfId,
1039  open_inet_addr_t destPrefix,
1040  uint32_t pfxLen,
1041  openRoute_t *route,
1042  open_buffdesc *nextHopListBuff);
1043 
1044 /*****************************************************************/
1065  uint32_t vrfId,
1066  open_inet_addr_t *nh_addr,
1067  open_buffdesc *mac,
1068  uint32_t cbParm1,
1069  uint32_t cbParm2,
1070  uint32_t cbParm3);
1071 
1072 /*****************************************************************/
1102  OPEN_AF_t family,
1103  uint32_t pid,
1104  uint32_t vrfId,
1105  open_buffdesc *clientName,
1106  uint32_t *clientId);
1107 
1108 /*****************************************************************/
1131  uint32_t clientId);
1132 
1133 /*****************************************************************/
1155  uint32_t clientId,
1156  OPEN_ROUTE_EVENT_t *chType,
1157  openRoute_t *route,
1158  open_buffdesc *nextHopListBuff);
1159 
1160 /*****************************************************************/
1180  uint32_t clientId,
1181  uint32_t numChanges,
1182  open_buffdesc *routeListBuff);
1183 
1184 /*****************************************************************/
1205  uint32_t clientId, uint32_t intIfNum,
1206  uint32_t numChanges,
1207  open_buffdesc *routeListBuff);
1208 
1209 /*****************************************************************/
1228  uint32_t *maxNextHops);
1229 
1230 /*****************************************************************/
1253  OPEN_AF_t family,
1254  uint32_t pid,
1255  uint32_t vrfId,
1256  open_buffdesc *clientName,
1257  uint32_t *clientId);
1258 
1259 /*****************************************************************/
1275  uint32_t vrfId,
1276  uint32_t clientId);
1277 
1278 /*****************************************************************/
1297  uint32_t vrfId,
1298  uint32_t clientId,
1299  uint32_t eventId);
1300 
1301 /*****************************************************************/
1318  uint32_t *routingIntfMax);
1319 
1320 /*****************************************************************/
1338  uint32_t vrfId,
1339  uint32_t intf,
1340  uint32_t *nextIntf);
1341 
1342 /*****************************************************************/
1359  uint32_t intf,
1360  uint32_t *nextIntf);
1361 
1362 /*****************************************************************/
1377  uint32_t intf,
1378  OPEN_INTF_TYPE_t *intfType);
1379 
1380 /*****************************************************************/
1397  uint32_t intIfNum,
1398  OPEN_BOOL_t *isUnnumbered);
1399 
1400 /*****************************************************************/
1420  uint32_t intIfNum, uint32_t *addr,
1421  uint32_t *mask);
1422 
1423 /*****************************************************************/
1438  uint32_t vrfId, open_buffdesc *vrfName);
1439 
1440 /*****************************************************************/
1457  open_buffdesc *vrfName,
1458  open_buffdesc *vrfNameNext);
1459 
1460 /*****************************************************************/
1476  open_buffdesc *vrfName,
1477  uint32_t *vrfId);
1478 
1479 /*****************************************************************/
1494  uint32_t intf,
1495  uint32_t *vlanId);
1496 
1497 /*****************************************************************/
1512  uint32_t intf,
1513  uint32_t *loopbackId);
1514 
1515 /*****************************************************************/
1530  uint32_t loopbackId,
1531  uint32_t *intf);
1532 
1533 /*****************************************************************/
1549  uint32_t *ifNameSize);
1550 
1551 /*****************************************************************/
1568  uint32_t intf,
1569  open_buffdesc *intfName);
1570 
1571 /*****************************************************************/
1586  uint32_t ifIndex, uint32_t *intIfNum);
1587 
1588 /*****************************************************************/
1603  uint32_t intf,
1604  uint32_t *ifIndex);
1605 
1606 /*****************************************************************/
1621  uint32_t intf,
1622  open_buffdesc *intfName);
1623 
1624 /*****************************************************************/
1640  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1641 
1642 /*****************************************************************/
1658  uint32_t vrfId, uint32_t intf, open_buffdesc *intfName);
1659 
1660 /*****************************************************************/
1675  uint32_t vrfId, open_buffdesc *intfName);
1676 
1677 /*****************************************************************/
1692  uint32_t intf,
1693  open_USP_t *usp);
1694 
1695 /*****************************************************************/
1710  uint32_t intf,
1711  open_buffdesc *mac);
1712 
1713 /*****************************************************************/
1730  OPEN_AF_t af,
1731  uint32_t intf,
1732  OPEN_CONTROL_t *ifState);
1733 
1734 /*****************************************************************/
1757  OPEN_AF_t af,
1758  uint32_t intf,
1759  open_inet_pfx_t *ipAddr);
1760 
1761 /*****************************************************************/
1785  OPEN_AF_t af,
1786  uint32_t intf,
1787  open_inet_pfx_t *ipAddr,
1788  uint32_t *index);
1789 
1790 /*****************************************************************/
1811  uint32_t intf,
1812  OPEN_INTF_IP_ADDR_METHOD_t *addrMethod,
1813  OPEN_CONTROL_t *clientIdEnable);
1814 
1815 /*****************************************************************/
1832  OPEN_AF_t af,
1833  uint32_t intf,
1834  uint32_t *ipMtu);
1835 
1836 /*****************************************************************/
1852  OPEN_AF_t af,
1853  uint32_t intf,
1854  uint32_t *bandwidth);
1855 
1856 /*****************************************************************/
1871  uint32_t intf,
1872  uint32_t *mode);
1873 
1874 /*****************************************************************/
1889  uint32_t intf,
1890  uint32_t *mode);
1891 
1892 /*****************************************************************/
1908  open_buffdesc *vrfName,
1909  uint32_t *burstSize,
1910  uint32_t *interval);
1911 
1912 /*****************************************************************/
1927  open_buffdesc *vrfName,
1928  uint32_t *mode);
1929 
1930 /*****************************************************************/
1945  OPEN_AF_t af,
1946  OPEN_CONTROL_t *enable);
1947 
1948 /*****************************************************************/
1982  OPEN_AF_t af,
1983  uint32_t *complete);
1984 
1985 /*****************************************************************/
2020  OPEN_AF_t af,
2021  uint32_t vrfId,
2022  uint32_t *complete);
2023 
2024 /*****************************************************************/
2044 int openapiRouteMapApply(openapiClientHandle_t *client_handle,
2045  open_buffdesc *routeMapName,
2046  openRmMatchParams_t *matchParams,
2047  openRmSetParams_t *setParams);
2048 
2049 /*****************************************************************/
2070  open_buffdesc *routeMapName,
2071  openRmMatchParams_t *matchParams,
2072  openRmSetParams_t *setParams,
2073  OPEN_FILTER_ACTION_t *action);
2074 
2075 /*****************************************************************/
2096  open_buffdesc *pfxListName,
2097  open_inet_addr_t prefix,
2098  uint32_t pfxLen);
2099 
2100 /*****************************************************************/
2132  open_buffdesc *clientName,
2133  uint32_t pid,
2134  uint32_t policyTypeMask,
2135  uint32_t *clientId);
2136 
2137 /*****************************************************************/
2155  uint32_t clientId,
2156  uint32_t seqNo);
2157 
2158 /*****************************************************************/
2174  OPEN_PREF_INDICES_t index,
2175  uint32_t *pref);
2176 
2177 /*****************************************************************/
2194  OPEN_PREF_INDICES_t index,
2195  uint32_t pref);
2196 
2197 /*****************************************************************/
2218  uint32_t protoId,
2219  open_buffdesc *protoName,
2220  uint32_t *nextProtoId);
2221 
2222 /*****************************************************************/
2238  OPEN_PREF_INDICES_t index,
2239  uint32_t *pref);
2240 
2241 /*****************************************************************/
2258  OPEN_PREF_INDICES_t index,
2259  uint32_t pref);
2260 
2261 /******* NEW OpENAPIs Added for virtual router support *************/
2262 
2263 /*****************************************************************/
2293  uint32_t vrfId,
2294  OPEN_AF_t family,
2295  uint32_t pid,
2296  open_buffdesc *clientName,
2297  uint32_t *clientId);
2298 
2299 /*****************************************************************/
2318  uint32_t vrfId,
2319  openRoute_t *routeEntry,
2320  open_buffdesc *nextHopListBuff);
2321 
2322 
2323 /**************************************************************************/
2334 open_error_t openapiBfdModeSet(OPEN_BFD_ADMIN_MODE_t mode);
2335 
2336 /*****************************************************************/
2351  openBfdEndpoint_t *ep,
2352  uint32_t *id);
2353 
2354 /*****************************************************************/
2369  openBfdEndpoint_t *ep,
2370  uint32_t id);
2371 
2372 /*****************************************************************/
2388  open_inet_addr_t peer,
2389  uint32_t *id);
2390 
2391 /*****************************************************************/
2407  uint32_t id,
2408  openBfdSessionInfo_t *info);
2409 
2410 /*****************************************************************/
2424  uint32_t id, openBfdSessionStats_t *stats);
2425 
2426 
2427 /*****************************************************************/
2446  uint32_t vrfId,
2447  openRoute_t *routeEntry,
2448  open_buffdesc *nextHopListBuff);
2449 
2450 /*****************************************************************/
2472  uint32_t vrfId,
2473  openRoute_t *routeEntry,
2474  open_buffdesc *nextHopListBuff);
2475 
2476 /*****************************************************************/
2493  uint32_t vrfId,
2494  openRoute_t *routeEntry,
2495  open_buffdesc *nextHopListBuff);
2496 
2497 /*****************************************************************/
2514  uint32_t vrfId,
2515  openRoute_t *routeEntry,
2516  open_buffdesc *nextHopListBuff);
2517 
2518 /*****************************************************************/
2533  uint32_t vrfId,
2534  uint32_t *rtoFreeRouteCount);
2535 
2536 /*****************************************************************/
2553  OPEN_AF_t af,
2554  uint32_t vrfId,
2555  OPEN_CONTROL_t *enable);
2556 
2557 /*****************************************************************/
2571  uint32_t *pval);
2572 
2573 /*****************************************************************/
2587  uint32_t *pval);
2588 
2589 /*****************************************************************/
2606  uint32_t vrfId,
2607  OPEN_NSF_PROTOCOL_t protocol);
2608 
2609 /*****************************************************************/
2627  uint32_t vrfId,
2628  OPEN_NSF_PROTOCOL_t protocol);
2629 
2630 /*****************************************************************/
2643  OPEN_BOOL_t *isBackupElected);
2644 
2645 /*****************************************************************/
2662  uint32_t intIfNum, uint32_t peerIp, OPEN_BOOL_t isAdd, uint32_t flag);
2663 
2664 /*****************************************************************/
2685  uint32_t vrfId,
2686  open_inet_addr_t *dest_addr,
2687  open_buffdesc *mac,
2688  int32_t stkIfIndex,
2689  uint16_t state);
2690 
2691 /*****************************************************************/
2709  uint32_t vrfId,
2710  open_inet_addr_t *dest_addr,
2711  int32_t stkIfIndex);
2712 
2713 /*****************************************************************/
2729  uint32_t vrfId,
2730  OPEN_PREF_INDICES_t index,
2731  uint32_t *pref);
2732 
2733 /*****************************************************************/
2748  openrIpv4Stats_t *ipv4Stats);
2749 
2750 /*****************************************************************/
2763  open_error_t
2765  uint32_t *defTTL);
2766 
2767 #endif /* OPENAPI_ROUTING_H_INCLUDED */
2768 
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 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.
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.
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.