libbgp  0.6
A C++ BGP Library.
bgp-config.h
Go to the documentation of this file.
1 
11 #ifndef BGP_CONFIG_H_
12 #define BGP_CONFIG_H_
13 #include <stdint.h>
14 #include "clock.h"
15 #include "bgp-rib4.h"
16 #include "bgp-rib6.h"
17 #include "bgp-filter.h"
18 #include "bgp-out-handler.h"
19 #include "bgp-log-handler.h"
20 #include "route-event-bus.h"
21 
22 namespace libbgp {
23 
28 typedef struct BgpConfig {
29  BgpConfig() {
30  rib4 = NULL;
31  rib6 = NULL;
32  rev_bus = NULL;
33  mp_bgp_ipv4 = mp_bgp_ipv6 = false;
34  no_collision_detection = false;
35  use_4b_asn = true;
36  peer_asn = 0;
38  clock = NULL;
39  hold_timer = 120;
41  allow_local_as = 0;
42  weight = 0;
43  no_autotick = false;
44  ibgp_alter_nexthop = false;
45  }
46 
54 
62 
70 
78 
86 
95 
107 
119 
120  // pointer to event bus, route add/withdraw events will be sent to other
121  // FSM thru event bus, won't use if NULL
122 
135 
143 
151 
163 
172 
177  uint32_t asn;
178 
183  uint32_t peer_asn;
184 
189  uint32_t router_id;
190 
202 
214 
223 
234 
244 
253 
264 
278 
288 
293  uint16_t hold_timer;
294 
306 
312 
321  int32_t weight;
322 
331 
340 } BgpConfig;
341 
358 }
359 
360 #endif // BGP_CONFIG_H_
IPv6 Route/Prefix related utilities.
Definition: prefix6.h:27
The BgpRib4 (IPv4 BGP Routing Information Base) class.
Definition: bgp-rib4.h:87
RouteEventBus * rev_bus
Pointer to the route event bus.
Definition: bgp-config.h:134
BgpLogHandler * log_handler
The log handler.
Definition: bgp-config.h:94
The BGP FSM output handler.
The route event bus.
Prefix4 peering_lan4
The prefix of the IPv4 peering LAN.
Definition: bgp-config.h:201
BgpRib4 * rib4
Pointer to the IPv4 Routing Information Base object.
Definition: bgp-config.h:106
BgpFilterRules in_filters4
IPv4 Ingress route filters.
Definition: bgp-config.h:53
int32_t weight
Weight of this BGP session.
Definition: bgp-config.h:321
uint32_t default_nexthop4
The default IPv4 nexthop to use.
Definition: bgp-config.h:233
The RouteEventBus class.
The libbgp clock interface.
uint32_t router_id
Local BGP ID in network byte order. (required, no default value)
Definition: bgp-config.h:189
bool no_autotick
Disable auto tick on message reception.
Definition: bgp-config.h:330
bool forced_default_nexthop4
Forced IPv4 default nexthop.
Definition: bgp-config.h:243
int8_t allow_local_as
Allow numbers of local asn in as_path. (default: 0)
Definition: bgp-config.h:311
uint8_t default_nexthop6_global[16]
The default global IPv6 nexthop to use.
Definition: bgp-config.h:263
bool no_nexthop_check6
Disable IPv6 ingress nexthop validation.
Definition: bgp-config.h:252
Prefix6 peering_lan6
The prefix of the IPv6 peering LAN.
Definition: bgp-config.h:213
bool no_collision_detection
Disable collision detection.
Definition: bgp-config.h:142
BgpRib6 * rib6
Pointer to the IPv6 Routing Information Base object.
Definition: bgp-config.h:118
IPv4 Route/Prefix related utilities.
Definition: prefix4.h:25
The BgpRib6 (IPv6 BGP Routing Information Base) class.
Definition: bgp-rib6.h:98
Clock * clock
The clock to use for time-based events.
Definition: bgp-config.h:305
uint8_t default_nexthop6_linklocal[16]
The default link-local IPv6 nexthop to use.
Definition: bgp-config.h:277
BgpFilterRules in_filters6
IPv6 Ingress route filters.
Definition: bgp-config.h:69
Route filtering engine.
Definition: bgp-afi.h:14
The IPv4 BGP Routing Information Base.
The BGP FSM configuration object.
Definition: bgp-config.h:28
The BgpLogHandler class.
BgpFilterRules out_filters4
IPv4 Egress route filters.
Definition: bgp-config.h:61
BGP log handler.
BgpFilterRules out_filters6
IPv6 Ingress route filters.
Definition: bgp-config.h:77
The BGP filtering rules set.
Definition: bgp-filter.h:211
BgpOutHandler * out_handler
The output handler.
Definition: bgp-config.h:85
uint16_t hold_timer
The hold timer. (default: 120)
Definition: bgp-config.h:293
The Clock interface.
Definition: clock.h:31
bool no_nexthop_check4
Disable IPv4 ingress nexthop validation.
Definition: bgp-config.h:222
bool use_4b_asn
Enable four octets ASN support (RFC 6793)
Definition: bgp-config.h:150
bool mp_bgp_ipv4
Enable MP-BGP IPv4 support.
Definition: bgp-config.h:162
bool ibgp_alter_nexthop
Do alter_nexthop for IBGP sessions.
Definition: bgp-config.h:339
bool mp_bgp_ipv6
Enable MP-BGP IPv6 support.
Definition: bgp-config.h:171
The BGP Routing Information Base for IPv6.
uint32_t peer_asn
Peer ASN. Set to 0 will make BGP FSM accept peer with any ASN. (default: 0)
Definition: bgp-config.h:183
bool forced_default_nexthop6
Forced IPv6 default nexthop.
Definition: bgp-config.h:287
The BGP FSM output handler.
uint32_t asn
Local ASN. (required, no default value)
Definition: bgp-config.h:177