Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.6.0.3
openapi_bgp_config.h
Go to the documentation of this file.
1 
9 /*********************************************************************
10 *
11 * Copyright 2016-2018 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_bgp_config.h
28 *
29 * @purpose Border Gateway Protocol Configuration and Status
30 *
31 * @component OPEN
32 *
33 * @create 06/25/2013
34 *
35 * @end
36 *
37 **********************************************************************/
38 #ifndef OPENAPI_BGP_CONFIG_H_INCLUDED
39 #define OPENAPI_BGP_CONFIG_H_INCLUDED
40 
41 #include <stdbool.h>
42 #include "openapi_common.h"
43 
44 #define OPEN_BGP_NBR_MAX_PFX_NOLIMIT 0xFFFFFFFFUL
45 #define OPEN_BGP_ERR_STR_LEN 64
46 #define OPEN_BGP_AFI_MAX 3
47 #define OPEN_BGP_MAX_DP_REASON_STR 16
48 #define OPEN_BGP_MAX_STATS_ENTRIES 20
49 #define OPEN_BGP_MAX_PASSWORD 25
50 #define OPEN_BGP_MAX_TEMPLATE_NAME 32
51 #define OPEN_BGP_PEER_DESC_LENGTH 80
52 #define OPEN_BGP_PEER_ADDR_STR_LENGTH 128
55 #define OPEN_BGP_UPD_GROUP_NONE 0xFFFF
56 
58 typedef enum
59 {
66 
74 typedef enum
75 {
79 
81 typedef enum
82 {
86 
87 typedef enum
88 {
97 
98 typedef enum
99 {
104 
105 typedef enum
106 {
113 
116 {
117  uint16_t duplicateAttr;
119  uint16_t transFlag;
121  uint16_t optNonTransPart;
122  uint16_t attrTooLong;
123  uint16_t attrLenError;
124  uint16_t originInvalid;
125  uint16_t wrongFirstAs;
126  uint16_t invalidAsPathType;
127  uint16_t invalidNextHop;
128  uint16_t badNextHop;
129  uint16_t invalidAggregator;
130  uint16_t unknownWellKnown;
131  uint16_t missingMandatory;
132  uint16_t missingLocPref;
133  uint16_t invalidNetField;
134  uint16_t rxAsPathTooLong;
135  uint16_t origIdFromExtPeer;
139 
141 typedef struct open_bgpPeerStatus_s
142 {
144  uint32_t peerRouterId;
145 
148 
150  uint32_t peerAdminStatus;
151 
154 
157  uint16_t localTcpPort;
158 
160  uint16_t remoteTcpPort;
161 
163  uint32_t remoteAS;
164 
166  uint16_t capabilities;
167 
169  uint16_t negHoldTime;
170  uint16_t negKeepaliveTime;
171 
176  unsigned char lastErrorCode;
177  unsigned char lastErrorSubcode;
178  OPEN_BOOL_t lastErrorInbound;
179  uint32_t lastErrorTime;
180 
183  unsigned char lastSuberrorString[OPEN_BGP_ERR_STR_LEN];
184 
187 
189  uint32_t estTransitions;
190 
193  uint32_t estTime;
194 
196  uint32_t retryIntervalConf;
197  uint32_t holdTimeConf;
198  uint32_t keepAliveTimeConf;
203  uint32_t lastUpdate;
204 
207 
209  uint32_t txOpen;
210  uint32_t txUpdate;
211  uint32_t txKeepalive;
212  uint32_t txNotif;
213  uint32_t txRefresh;
214  uint32_t txTotal;
215 
217  uint32_t rxOpen;
218  uint32_t rxUpdate;
219  uint32_t rxKeepalive;
220  uint32_t rxNotif;
221  uint32_t rxRefresh;
222  uint32_t rxTotal;
223 
226 
229 
233  uint32_t inMinNlriPerUpdate[OPEN_BGP_AFI_MAX];
234 
237 
240  uint32_t outWithdraws[OPEN_BGP_AFI_MAX];
241  uint32_t outMaxNlriPerUpdate[OPEN_BGP_AFI_MAX];
242  uint32_t outMinNlriPerUpdate[OPEN_BGP_AFI_MAX];
243  uint32_t outPfxCurrent[OPEN_BGP_AFI_MAX];
244 
248 
252 
254  uint32_t updateQueueLen;
255  uint32_t updateQueueHigh;
257  uint32_t updateQueueDrops;
258 
261 
263  uint32_t flapCount;
264 
267  OPEN_BOOL_t ipv4Active;
268  OPEN_BOOL_t ipv6Active;
269 
272 
274 
276 typedef struct open_bgpDecProcHist_s
277 {
279  uint32_t decProcTime;
280 
282  uint16_t decProcPhase;
283 
285  uint16_t updateGroupId;
286 
288  uint32_t genId;
289 
292 
296 
298  uint16_t duration;
299 
301  uint16_t adds;
302  uint16_t mods;
303  uint16_t dels;
304 
306 
307 /*****************************************************************/
323  uint32_t *maxRoutes);
324 
325 /*****************************************************************/
341  uint32_t *maxRoutes);
342 
343 /*****************************************************************/
358  uint32_t *holdTime);
359 
360 /*****************************************************************/
378  uint32_t holdTime);
379 
380 /*****************************************************************/
395  uint32_t *keepAlive);
396 
397 /*****************************************************************/
415  uint32_t keepAlive);
416 
417 /*****************************************************************/
432  uint32_t *localAS);
433 
434 /*****************************************************************/
453  uint32_t localAS);
454 
455 /*****************************************************************/
470  uint32_t *routerId);
471 
472 /*****************************************************************/
488  uint32_t routerId);
489 
490 /*****************************************************************/
505  uint32_t *localPref);
506 
507 /*****************************************************************/
525  uint32_t localPref);
526 
527 /*****************************************************************/
542  bool *log);
543 
544 /*****************************************************************/
560  bool log);
561 
562 /*****************************************************************/
579  OPEN_AF_t af,
580  bool isIbgp,
581  uint32_t *maxPaths);
582 
583 /*****************************************************************/
608  OPEN_AF_t af,
609  bool isIbgp,
610  uint32_t maxPaths);
611 
612 /*****************************************************************/
633  bool normalMode,
634  bool useRm,
635  open_inet_addr_t addr,
636  uint32_t pfxLen,
637  open_buffdesc *rmName);
638 
639 /*****************************************************************/
674  bool add,
675  open_buffdesc *protoName,
676  bool matchSet,
677  uint32_t matchBits,
678  bool metricSet,
679  bool metricValueSet,
680  uint32_t metricValue,
681  bool routeMapSet,
682  OPEN_AF_t af,
683  open_buffdesc *rmName);
684 
685 /********************************************************************/
686 /*********************** NEIGHBOR / PEER API's **********************/
687 /********************************************************************/
688 
689 /*****************************************************************/
714  OPEN_BGP_PARAM_TYPE pType,
715  open_inet_addr_t remoteAddr,
716  uint32_t scopeId,
717  OPEN_AF_t af,
718  bool *activate);
719 
720 /*****************************************************************/
746  open_inet_addr_t remoteAddr,
747  uint32_t scopeId,
748  OPEN_AF_t af,
749  bool activate,
750  bool defValue);
751 
752 /*****************************************************************/
777  OPEN_BGP_PARAM_TYPE pType,
778  open_inet_addr_t remoteAddr,
779  uint32_t scopeId,
780  OPEN_BGP_PEER_STATE_t *status);
781 
782 /*****************************************************************/
808  open_buffdesc *vrf,
809  OPEN_BGP_PARAM_TYPE pType,
810  open_inet_addr_t remoteAddr,
811  uint32_t scopeId,
812  OPEN_BGP_PEER_STATE_t *status);
813 
814 
815 /*****************************************************************/
837  open_inet_addr_t remoteAddr,
838  uint32_t scopeId,
839  OPEN_BGP_PEER_STATE_t status,
840  bool defValue);
841 
842 /*****************************************************************/
865  open_buffdesc *vrf,
866  open_inet_addr_t remoteAddr,
867  uint32_t scopeId,
868  OPEN_BGP_PEER_STATE_t status,
869  bool defValue);
870 
871 
872 /*****************************************************************/
895  OPEN_BGP_PARAM_TYPE pType,
896  open_inet_addr_t remoteAddr,
897  uint32_t scopeId,
898  OPEN_AF_t af,
899  uint32_t *interval);
900 
901 /*****************************************************************/
929  open_inet_addr_t remoteAddr,
930  uint32_t scopeId,
931  OPEN_AF_t af,
932  uint32_t interval,
933  bool defValue);
934 
935 /*****************************************************************/
957  OPEN_BGP_PARAM_TYPE pType,
958  open_inet_addr_t remoteAddr,
959  uint32_t scopeId,
960  uint32_t *holdTime);
961 
962 /*****************************************************************/
985  open_inet_addr_t remoteAddr,
986  uint32_t scopeId,
987  uint32_t holdTime,
988  bool defValue);
989 
990 /*****************************************************************/
1012  OPEN_BGP_PARAM_TYPE pType,
1013  open_inet_addr_t remoteAddr,
1014  uint32_t scopeId,
1015  uint32_t *keepAlive);
1016 
1017 /*****************************************************************/
1040  open_inet_addr_t remoteAddr,
1041  uint32_t scopeId,
1042  uint32_t keepAlive,
1043  bool defValue);
1044 
1045 /*****************************************************************/
1069  OPEN_BGP_PARAM_TYPE pType,
1070  open_inet_addr_t remoteAddr,
1071  uint32_t scopeId,
1072  OPEN_AF_t af,
1073  OPEN_CONTROL_t *enable);
1074 
1075 /*****************************************************************/
1100  open_inet_addr_t remoteAddr,
1101  uint32_t scopeId,
1102  OPEN_AF_t af,
1103  OPEN_CONTROL_t enable,
1104  bool defValue);
1105 
1106 /*****************************************************************/
1132  OPEN_BGP_PARAM_TYPE pType,
1133  open_inet_addr_t remoteAddr,
1134  uint32_t scopeId,
1135  OPEN_AF_t af,
1136  uint32_t *pfxLimit,
1137  uint32_t *threshold,
1138  bool *warningOnly);
1139 
1140 /*****************************************************************/
1174  open_inet_addr_t remoteAddr,
1175  uint32_t scopeId,
1176  OPEN_AF_t af,
1177  uint32_t pfxLimit,
1178  uint32_t threshold,
1179  bool warningOnly,
1180  bool defValue);
1181 
1182 /*****************************************************************/
1201  open_inet_addr_t remoteAddr,
1202  uint32_t scopeId,
1203  uint32_t *remoteAS);
1204 
1205 /*****************************************************************/
1225  open_buffdesc *vrf,
1226  open_inet_addr_t remoteAddr,
1227  uint32_t scopeId,
1228  uint32_t *remoteAS);
1229 
1230 /*****************************************************************/
1254  open_inet_addr_t remoteAddr,
1255  uint32_t scopeId,
1256  uint32_t remoteAS);
1257 
1258 /*****************************************************************/
1283  open_buffdesc *vrf,
1284  open_inet_addr_t remoteAddr,
1285  uint32_t scopeId,
1286  uint32_t remoteAS);
1287 
1288 
1289 /*****************************************************************/
1312  OPEN_BGP_PARAM_TYPE pType,
1313  open_inet_addr_t remoteAddr,
1314  uint32_t scopeId,
1315  uint32_t *source);
1316 
1317 /*****************************************************************/
1340  open_inet_addr_t remoteAddr,
1341  uint32_t scopeId,
1342  uint32_t source,
1343  bool defValue);
1344 
1345 /*****************************************************************/
1362  OPEN_CONTROL_t * adminMode);
1363 
1364 /*****************************************************************/
1382  OPEN_CONTROL_t adminMode);
1383 
1384 /*****************************************************************/
1404  OPEN_AF_t af,
1405  uint32_t * numNetworks,
1406  uint32_t * numAsPaths);
1407 
1408 /*****************************************************************/
1429  OPEN_AF_t af,
1430  open_inet_addr_t prevRemoteAddr,
1431  uint32_t prevScopeId,
1432  open_inet_addr_t * remoteAddr,
1433  uint32_t * scopeId);
1434 
1435 /*****************************************************************/
1459  OPEN_AF_t af,
1460  open_inet_addr_t prevRemoteAddr,
1461  uint32_t prevScopeId,
1462  open_buffdesc *vrf,
1463  open_inet_addr_t * remoteAddr,
1464  uint32_t * scopeId);
1465 
1466 /*****************************************************************/
1488  open_inet_addr_t remoteAddr,
1489  uint32_t scopeId,
1490  OPEN_AF_t af,
1491  open_bgpPeerStatus_t * status);
1492 
1493 /*****************************************************************/
1515  open_buffdesc *vrf,
1516  open_inet_addr_t remoteAddr,
1517  uint32_t scopeId,
1518  OPEN_AF_t af,
1519  open_bgpPeerStatus_t * status);
1520 
1521 /*****************************************************************/
1538  uint32_t * maxLen);
1539 
1540 /*****************************************************************/
1562  open_buffdesc * bufdName);
1563 
1564 /*****************************************************************/
1586  open_buffdesc * bufdName);
1587 
1588 /*****************************************************************/
1607  open_buffdesc * bufdName, OPEN_AF_t af);
1608 
1609 /*****************************************************************/
1628  open_buffdesc * bufdName, OPEN_AF_t af);
1629 
1630 /*****************************************************************/
1649  open_buffdesc * bufdName,
1650  OPEN_AF_t af,
1651  OPEN_CONTROL_t enable);
1652 
1653 /*****************************************************************/
1668  uint32_t * maxLen);
1669 
1670 /*****************************************************************/
1690  open_inet_addr_t remoteAddr,
1691  uint32_t scopeId,
1692  open_buffdesc * bufdName,
1693  bool defValue);
1694 
1695 /*****************************************************************/
1715  open_buffdesc *vrf,
1716  open_inet_addr_t remoteAddr,
1717  uint32_t scopeId,
1718  open_buffdesc * bufdName,
1719  bool defValue);
1720 
1721 /*****************************************************************/
1740  open_inet_addr_t remoteAddr,
1741  uint32_t scopeId,
1742  open_buffdesc * bufdName);
1743 
1744 /*****************************************************************/
1763  open_buffdesc *vrf,
1764  open_inet_addr_t remoteAddr,
1765  uint32_t scopeId,
1766  open_buffdesc * bufdName);
1767 
1768 
1769 /*****************************************************************/
1792  open_inet_addr_t remoteAddr,
1793  uint32_t scopeId,
1794  open_buffdesc * bufdName, bool defValue);
1795 
1796 /*****************************************************************/
1816  open_inet_addr_t remoteAddr,
1817  uint32_t scopeId,
1818  open_buffdesc * bufdName);
1819 
1820 /*****************************************************************/
1843  OPEN_BGP_PARAM_TYPE pType,
1844  open_inet_addr_t remoteAddr,
1845  uint32_t scopeId,
1846  uint32_t * connRetryInterval);
1847 
1848 /*****************************************************************/
1863  uint32_t * maxLen);
1864 
1865 /*****************************************************************/
1888  OPEN_BGP_PARAM_TYPE pType,
1889  open_inet_addr_t remoteAddr,
1890  uint32_t scopeId,
1891  open_buffdesc * bufdName);
1892 
1893 /*****************************************************************/
1915  open_inet_addr_t remoteAddr,
1916  uint32_t scopeId,
1917  open_buffdesc * bufdName,
1918  bool defValue);
1919 
1920 /*****************************************************************/
1941  OPEN_AF_t af,
1942  uint32_t index,
1943  open_bgpDecProcHist_t * pHist);
1944 
1945 /*****************************************************************/
1963  OPEN_AF_t af,
1964  uint32_t * numEntries);
1965 
1966 /*****************************************************************/
1988  open_inet_addr_t remoteAddr,
1989  uint32_t scopeId, OPEN_AF_t af,
1990  uint32_t * flapCount);
1991 
1992 /*****************************************************************/
2011  uint32_t scopeId,
2012  open_inet_addr_t * nbrPeerAddr);
2013 
2014 /*****************************************************************/
2036  open_buffdesc * bufdName,
2037  uint32_t scopeId);
2038 
2039 /*****************************************************************/
2054  uint32_t * maxLen);
2055 
2056 /*****************************************************************/
2078  open_inet_addr_t peerAddr,
2079  uint32_t scopeId,
2080  OPEN_BOOL_t * enableBfd);
2081 
2082 #endif /* OPENAPI_BGP_CONFIG_H_INCLUDED */
2083 
uint16_t missingMandatory
Missing mandatory path attribute.
open_error_t openapiBgpTemplateAFSet(openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af)
Set the address-family of given template.
open_error_t openapiBgpMapPeerPasswordGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
Get the TCP MD5 password for a given peer.
OPEN_OSPF_METRIC_TYPES_t
OSPF redistribution metric bits for match option.
open_error_t openapiBgpPeerAdminStatusGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t *status)
Get the administrative status (start/stop) of a given BGP peer.
uint32_t updateQueueLen
Receive queue related statistics.
uint16_t duplicateAttr
Path with duplicate attribute.
OPEN_BGP4_PEER_STATE_t
uint32_t inPfxRejected[OPEN_BGP_AFI_MAX]
Number of prefixes rejected from this peer, whose paths have failed the inbound policy checks...
peer or inherited value from template
uint16_t originInvalid
Invalid ORIGIN code.
open_error_t openapiBgpMapPeerPasswordMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Get maximum length of password.
uint16_t wrongFirstAs
Unexpected first ASN in AS path.
OPEN_BGP_PEER_STATE_t
Start or stop a BGP peer.
OPEN_BOOL_t remoteAfiEnabled[OPEN_BGP_AFI_MAX]
AFI data received on this peer.
uint16_t invalidNetField
Invalid prefix in Update NLRI.
uint32_t inMaxNlriPerUpdate[OPEN_BGP_AFI_MAX]
Largest and smallest number of NLRI included in any one UPDATE message received from this peer...
uint16_t remoteTcpPort
Remote TCP port numbers for TCP connection to peer.
uint16_t mandNonTransOrPart
Mandatory attribute non-transitive or partial.
open_error_t openapiBgpPeerNextHopSelfModeSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, OPEN_CONTROL_t enable, bool defValue)
Configure BGP to use a local address when advertising routes to a given internal peer.
open_error_t openapiBgpRedistributionSet(openapiClientHandle_t *client_handle, bool add, open_buffdesc *protoName, bool matchSet, uint32_t matchBits, bool metricSet, bool metricValueSet, uint32_t metricValue, bool routeMapSet, OPEN_AF_t af, open_buffdesc *rmName)
Set route redistribution options for routes learned from a specific source.
open_error_t openapiBgpLogNeighborChangesSet(openapiClientHandle_t *client_handle, bool log)
Enable/Disable log neighbor changes.
uint16_t attrTooLong
Path attribute too long.
open_error_t openapiBgpPeerRemoteASVrfGet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *remoteAS)
Return a remote Autonomous System (AS) number that this peer belongs to.
open_error_t openapiBgpLogNeighborChangesGet(openapiClientHandle_t *client_handle, bool *log)
Get the log neighbor changes parameter.
open_inet_addr_t localAddr
IP address/port of local end of TCP connection to peer.
uint16_t negHoldTime
Hold and keepalive times negotiated with peer.
uint32_t decProcTime
Number of seconds since decision process ran.
#define OPEN_BGP_AFI_MAX
Maximum of BGP address family.
open_error_t openapiBgpMapDecProcHistoryByIndexGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t index, open_bgpDecProcHist_t *pHist)
Get Decision Process History information of BGP for a given index and address family.
open_error_t openapiBgpGlobalKeepAliveConfiguredSet(openapiClientHandle_t *client_handle, uint32_t keepAlive)
Set the configured keep alive time for all peers.
uint16_t invalidAsPathType
Invalid AS path segment type.
open_error_t openapiBgpPeerUpdateSourceGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *source)
Get the interface whose IP address that BGP uses as the source IP address in packets sent to a given ...
open_error_t openapiBgpPeerNextHopSelfModeGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, OPEN_CONTROL_t *enable)
Determine whether BGP sets the BGP NEXT_HOP to a local address when forwarding external routes to a g...
open_error_t openapiBgpMapPeerRemoteAddrVrfGetNext(openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_addr_t prevRemoteAddr, uint32_t prevScopeId, open_buffdesc *vrf, open_inet_addr_t *remoteAddr, uint32_t *scopeId)
Given the IP address of one peer, and a VRF name, get the IP address of the next peer.
uint16_t decProcPhase
Decision process phase that ran.
uint32_t retryIntervalConf
Time intervals required by MIB.
#define OPEN_BGP_ERR_STR_LEN
String length of last Received/Sent error notification message from peer.
open_error_t
OPEN uses these enumerators to indicate the error codes.
uint32_t estTime
How long, in seconds, since the adjacency transitioned into or out of the ESTABLISHED state...
open_error_t openapiBgpMapPeerPasswordSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
Set the TCP MD5 password for a given peer.
uint32_t peerAdminStatus
Peer admin status.
uint16_t missingLocPref
Missing LOCAL PREF attribute.
struct open_bgpPeerRxAttrErrors_s open_bgpPeerRxAttrErrors_t
Counters for BGP path attribute errors for received paths.
open_error_t openapiBgpMaxPathsSet(openapiClientHandle_t *client_handle, OPEN_AF_t af, bool isIbgp, uint32_t maxPaths)
Set the value of maximum Paths attribute.
uint16_t invalidNextHop
Invalid BGP NEXT HOP.
uint16_t clusterListFromExtPeer
Received Cluster List from external peer.
uint32_t lastUpdate
How long, in seconds, since last UPDATE message received from peer.
OPEN_BOOL_t rfc5549Support
RFC 5549 supported.
Structure used to report BGP decision process history.
open_error_t openapiBgpLocalPrefGet(openapiClientHandle_t *client_handle, uint32_t *localPref)
Get the value of local preference attribute.
uint16_t duration
How long the decision process phase took.
open_error_t openapiBgpPeerDescriptionGet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
Get the description for a given peer.
Structure used to report BGP peer status.
uint16_t rxAsPathTooLong
Received AS Path Too Long.
open_error_t openapiBgpGlobalKeepAliveConfiguredGet(openapiClientHandle_t *client_handle, uint32_t *keepAlive)
Get the configured keep alive time for all peers.
uint16_t badNextHop
Bad BGP NEXT HOP.
uint32_t inWithdraws[OPEN_BGP_AFI_MAX]
Number of prefixes this peer has withdrawn.
open_error_t openapiBgpPeerAddressStringMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Gets the BGP peer address name string length.
open_bgpPeerRxAttrErrors_t attrErr
Receive path attribute error counters.
open_error_t openapiBgpMapPeerFlapCountGet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *flapCount)
Get flap count of given neighbor.
open_error_t openapiBgpPeerAdvertisementIntervalGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *interval)
Get the advertisement interval for a given BGP peer.
open_error_t openapiBgpPeerInheritGet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
Get the template name for a given peer.
open_error_t openapiBgpMapPeerRemoteAddrGetNext(openapiClientHandle_t *client_handle, OPEN_AF_t af, open_inet_addr_t prevRemoteAddr, uint32_t prevScopeId, open_inet_addr_t *remoteAddr, uint32_t *scopeId)
Given the IP address of one peer, get the IP address of the next peer.
uint32_t peerRouterId
Peer Router Id.
uint16_t updateGroupId[OPEN_BGP_AFI_MAX]
ID of outbound update group this peer is in.
uint32_t txOpen
Transmit message stats.
open_inet_addr_t peerAddr
Only set if decProcPhase is 1.
open_error_t openapiBgpPeerUpdateSourceSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t source, bool defValue)
Set the interface whose IP address that BGP uses as the source IP address in packets sent to a given ...
uint32_t inPfxAccepted[OPEN_BGP_AFI_MAX]
Number of prefixes accepted from this peer, whose paths do not have an AS path loop and whose BGP NEX...
open_error_t openapiBgpPeerHoldTimeConfiguredSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t holdTime, bool defValue)
Set the configured hold time for a given BGP peer.
OPEN_E_OPTCAPTYPES_t
uint32_t inPrefix[OPEN_BGP_AFI_MAX]
Number of prefixes received from this peer.
uint32_t rxOpen
Receive message stats.
unsigned char lastErrorCode
Error code and subcode in last NOTIFICATION message sent to or received from peer.
OPEN_AF_t
OPEN uses these enumerators to indicate address family, IPV4 or IPV6.
open_error_t openapiBgpPeerRemoteASGet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *remoteAS)
Return a remote Autonomous System (AS) number that this peer belongs to.
OPEN_BGP_PARAM_TYPE
A peer can inherit parameter values from a peer template.
open_error_t openapiBgpMapPeerStatusVrfGet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, open_bgpPeerStatus_t *status)
Get the status of a peer for the given VRF instance and IP address.
open_error_t openapiBgpMapGlobalStatusInfoGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *numNetworks, uint32_t *numAsPaths)
Get BGP global status of number of network entries and number of AS paths.
uint16_t updateGroupId
Outbound update group ID.
open_error_t openapiBgpTemplateSet(openapiClientHandle_t *client_handle, open_buffdesc *bufdName)
Set the template name and inuse flag.
open_error_t openapiBgpPeerAdminStatusVrfGet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t *status)
Get the administrative status (start/stop) of a given BGP peer.
open_error_t openapiBgpAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *adminMode)
Gets the Bgp Admin Mode.
open_error_t openapiBgpIpv4RouteMax(openapiClientHandle_t *client_handle, uint32_t *maxRoutes)
Get the (configured) maximum number of BGP IPv4 routes for this platform.
open_error_t openapiBgpPeerAdminStatusVrfSet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t status, bool defValue)
Set the administrative status (start/stop) of a given BGP peer.
uint32_t updateQueueLimit
maximum length accomodated
uint32_t peerNegotiatedVersion
Negotiated Peer Version.
open_error_t openapiBgpMapDecProcHistoryCountGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, uint32_t *numEntries)
Get Decision Process History count of BGP for a given address family.
uint32_t minASOriginationConf
Not currently supported.
open_error_t openapiBgpTemplateDelete(openapiClientHandle_t *client_handle, open_buffdesc *bufdName)
Clear the template name and inuse flag.
open_error_t openapiBgpLocalIdSet(openapiClientHandle_t *client_handle, uint32_t routerId)
Set the BGP router ID.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
open_error_t openapiBgpPeerAdvertisementIntervalSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t interval, bool defValue)
Set the advertisement interval for a given BGP peer.
uint32_t minRouteAdvIntConf
duplicate of configured advertisementInterval
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiBgpMapPeerConnRetryIntervalGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *connRetryInterval)
Get the connection retry interval for a given BGP peer.
struct open_bgpDecProcHist_s open_bgpDecProcHist_t
Structure used to report BGP decision process history.
open_error_t openapiBgpLocalPrefSet(openapiClientHandle_t *client_handle, uint32_t localPref)
Set the value of local preference attribute.
uint32_t outPrefix[OPEN_BGP_AFI_MAX]
Similar on the send side.
open_error_t openapiBgpIpv6RouteMax(openapiClientHandle_t *client_handle, uint32_t *maxRoutes)
Get the (configured) maximum number of BGP IPv6 routes for this platform.
uint32_t estTransitions
Number of transitions to the ESTABLISHED state since BGP counters last cleared.
OPEN_BGP4_PEER_STATE_t peerState
Peer status.
open_error_t openapiBgpNetworkAddDelete(openapiClientHandle_t *client_handle, bool normalMode, bool useRm, open_inet_addr_t addr, uint32_t pfxLen, open_buffdesc *rmName)
Add or Delete a logically originated network.
open_error_t openapiBgpPeerDescriptionNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Gets the description name maximum length.
open_error_t openapiBgpPeerHoldTimeConfiguredGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *holdTime)
Get the configured hold time for a given BGP peer.
open_error_t openapiBgpPeerKeepAliveConfiguredGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t *keepAlive)
Get the configured keep alive time for a given BGP peer.
open_error_t openapiBgpPeerRemoteASVrfSet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t remoteAS)
Create a peer with a given IP address and Autonomous System (AS) number.
open_error_t openapiBgpPeerActivateSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, bool activate, bool defValue)
Configure whether a given peer advertises and accepts routes for a given address family.
open_error_t openapiBgpPeerAdminStatusSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_BGP_PEER_STATE_t status, bool defValue)
Set the administrative status (start/stop) of a given BGP peer.
uint16_t transFlag
Transitive flag not set on transitive attr.
uint16_t origIdFromExtPeer
Received Originator ID from external peer.
uint16_t attrLenError
Path attribute length error.
open_error_t openapiBgpPeerDescriptionVrfSet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
Set the description field for the specified peer.
open_error_t openapiBgpPeerKeepAliveConfiguredSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t keepAlive, bool defValue)
Set the configured keep alive time for a given BGP peer.
open_error_t openapiBgpPeerDescriptionVrfGet(openapiClientHandle_t *client_handle, open_buffdesc *vrf, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName)
Get the description for a given peer.
open_error_t openapiBgpMapPeerStatusGet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, open_bgpPeerStatus_t *status)
Get the status of a peer for a default VRF instance with a given IP address.
uint16_t invalidAggregator
Invalid AGGREGATOR attribute.
open_error_t openapiBgpAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t adminMode)
Sets the Bgp Admin mode.
uint32_t holdTimeConf
duplicate of configured hold time
unsigned char reason[OPEN_BGP_MAX_DP_REASON_STR]
reason for decision process triggered
open_error_t openapiBgpGlobalHoldTimeConfiguredGet(openapiClientHandle_t *client_handle, uint32_t *holdTime)
Get the configured hold time for all peers.
open_error_t openapiBgpPeerPfxLimitSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t pfxLimit, uint32_t threshold, bool warningOnly, bool defValue)
Set the prefix limit configured for a given peer.
open_error_t openapiBgpTemplateNameMaxLengthGet(openapiClientHandle_t *client_handle, uint32_t *maxLen)
Gets the Template Name string length.
open_error_t openapiBgpLocalASSet(openapiClientHandle_t *client_handle, uint32_t localAS)
Set the Local Autonomous System (AS) number.
open_error_t openapiBgpPeerPfxLimitGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, uint32_t *pfxLimit, uint32_t *threshold, bool *warningOnly)
Get the prefix limit configured for a given peer.
open_error_t openapiBgpLocalASGet(openapiClientHandle_t *client_handle, uint32_t *localAS)
Get the Local Autonomous System (AS) number.
open_error_t openapiBgpPeerAutodetectedIpGet(openapiClientHandle_t *client_handle, uint32_t scopeId, open_inet_addr_t *nbrPeerAddr)
Get the IP address of autodetected peer on the specifed interface.
uint16_t optNonTransPart
Optional attribute non-transitive and partial.
uint32_t remoteAS
Remote AS.
struct open_bgpPeerStatus_s open_bgpPeerStatus_t
Structure used to report BGP peer status.
open_error_t openapiBgpTemplateAFClear(openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af)
Clear the address-family of given template.
open_error_t openapiBgpGlobalHoldTimeConfiguredSet(openapiClientHandle_t *client_handle, uint32_t holdTime)
Set the configured hold time for all peers.
open_error_t openapiBgpPeerActivateGet(openapiClientHandle_t *client_handle, OPEN_BGP_PARAM_TYPE pType, open_inet_addr_t remoteAddr, uint32_t scopeId, OPEN_AF_t af, bool *activate)
Determine whether a given peer is configured to exchange routes for a given address family...
#define OPEN_BGP_MAX_DP_REASON_STR
Maximum length of a reason (Why decision process was triggered) string.
OPEN_BGP4_PEER_TYPE_t
uint32_t flapCount
Total number of times the neighbors flaps.
uint32_t inPfxCurrent[OPEN_BGP_AFI_MAX]
Current number of prefixes this peer is advertising to us.
uint32_t keepAliveTimeConf
duplicate of configured keep alive time
open_error_t openapiBgpTemplateSendCommunitySet(openapiClientHandle_t *client_handle, open_buffdesc *bufdName, OPEN_AF_t af, OPEN_CONTROL_t enable)
Clear the address-family of given template.
uint16_t capabilities
Bitmask indexed by e_OptCapTypes.
uint16_t unknownWellKnown
Unrecognized well-known path attribute.
unsigned char lastErrorString[OPEN_BGP_ERR_STR_LEN]
String representations of the previous two.
open_error_t openapiBgpMapPeerFalloverBfdGet(openapiClientHandle_t *client_handle, open_inet_addr_t peerAddr, uint32_t scopeId, OPEN_BOOL_t *enableBfd)
Get the BFD fast fallover setting to the peer.
uint16_t adds
Number of adds, mods, dels during decision process phase.
open_error_t openapiBgpPeerInheritSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
Configure a given peer to inherit configuration parameters from a named peer template.
Counters for BGP path attribute errors for received paths.
open_error_t openapiBgpLocalIdGet(openapiClientHandle_t *client_handle, uint32_t *routerId)
Get the BGP router ID.
uint32_t genId
generation ID of BGP routing table when decision process was run.
open_error_t openapiBgpMaxPathsGet(openapiClientHandle_t *client_handle, OPEN_AF_t af, bool isIbgp, uint32_t *maxPaths)
Get the value of maximum Paths attribute.
open_error_t openapiBgpPeerRemoteASSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, uint32_t remoteAS)
Create a peer with a given IP address and Autonomous System (AS) number.
OPEN_BGP4_PEER_TYPE_t peerType
Peer type for IPv4.
open_error_t openapiBgpPeerAddrScopeCat(openapiClientHandle_t *client_handle, open_buffdesc *bufdName, uint32_t scopeId)
Utility to concatenate an address scope to a peer address.
uint16_t wellKwnOptConflict
Path with well-known/optional conflict.
open_error_t openapiBgpPeerDescriptionSet(openapiClientHandle_t *client_handle, open_inet_addr_t remoteAddr, uint32_t scopeId, open_buffdesc *bufdName, bool defValue)
Set the description field for the specified peer.