libbgp  0.6
A C++ BGP Library.
Public Attributes | List of all members
libbgp::BgpConfig Struct Reference

The BGP FSM configuration object. More...

#include <bgp-config.h>

Collaboration diagram for libbgp::BgpConfig:
Collaboration graph
[legend]

Public Attributes

BgpFilterRules in_filters4
 IPv4 Ingress route filters. More...
 
BgpFilterRules out_filters4
 IPv4 Egress route filters. More...
 
BgpFilterRules in_filters6
 IPv6 Ingress route filters. More...
 
BgpFilterRules out_filters6
 IPv6 Ingress route filters. More...
 
BgpOutHandlerout_handler
 The output handler. More...
 
BgpLogHandlerlog_handler
 The log handler. More...
 
BgpRib4rib4
 Pointer to the IPv4 Routing Information Base object. More...
 
BgpRib6rib6
 Pointer to the IPv6 Routing Information Base object. More...
 
RouteEventBusrev_bus
 Pointer to the route event bus. More...
 
bool no_collision_detection
 Disable collision detection. More...
 
bool use_4b_asn
 Enable four octets ASN support (RFC 6793) More...
 
bool mp_bgp_ipv4
 Enable MP-BGP IPv4 support. More...
 
bool mp_bgp_ipv6
 Enable MP-BGP IPv6 support. More...
 
uint32_t asn
 Local ASN. (required, no default value)
 
uint32_t peer_asn
 Peer ASN. Set to 0 will make BGP FSM accept peer with any ASN. (default: 0)
 
uint32_t router_id
 Local BGP ID in network byte order. (required, no default value)
 
Prefix4 peering_lan4
 The prefix of the IPv4 peering LAN. More...
 
Prefix6 peering_lan6
 The prefix of the IPv6 peering LAN. More...
 
bool no_nexthop_check4
 Disable IPv4 ingress nexthop validation. More...
 
uint32_t default_nexthop4
 The default IPv4 nexthop to use. More...
 
bool forced_default_nexthop4
 Forced IPv4 default nexthop. More...
 
bool no_nexthop_check6
 Disable IPv6 ingress nexthop validation. More...
 
uint8_t default_nexthop6_global [16]
 The default global IPv6 nexthop to use. More...
 
uint8_t default_nexthop6_linklocal [16]
 The default link-local IPv6 nexthop to use. More...
 
bool forced_default_nexthop6
 Forced IPv6 default nexthop. More...
 
uint16_t hold_timer
 The hold timer. (default: 120)
 
Clockclock
 The clock to use for time-based events. More...
 
int8_t allow_local_as
 Allow numbers of local asn in as_path. (default: 0)
 
int32_t weight
 Weight of this BGP session. More...
 
bool no_autotick
 Disable auto tick on message reception. More...
 
bool ibgp_alter_nexthop
 Do alter_nexthop for IBGP sessions. More...
 

Detailed Description

The BGP FSM configuration object.

Examples:
peer-and-print.cc, route-event-bus.cc, route-filter.cc, and route-server.cc.

Definition at line 28 of file bgp-config.h.

Member Data Documentation

◆ clock

Clock* libbgp::BgpConfig::clock

The clock to use for time-based events.

Time-based events like hold timer expired needs to refer to the clock. Sometime we may not want to use the system clock. For example, if BgpFsm is used inside a simulator like ns3, we will need to use the simulated clock instead of the real-time clock. Set this to NULL if you want to use a real-time clock. (default: NULL)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 305 of file bgp-config.h.

◆ default_nexthop4

uint32_t libbgp::BgpConfig::default_nexthop4

The default IPv4 nexthop to use.

Default nexthop is used when sending routes to the peer. The nexthop value will remain unchanged if it is inside peering LAN. Default nexthop is used only when the nexthop attribute of an egress route is not in peering LAN. (required, no default value)

Examples:
route-event-bus.cc, and route-filter.cc.

Definition at line 233 of file bgp-config.h.

◆ default_nexthop6_global

uint8_t libbgp::BgpConfig::default_nexthop6_global[16]

The default global IPv6 nexthop to use.

Default nexthop is used when sending routes to the peer. The nexthop value will remain unchanged if it is inside peering LAN. Default nexthop is used only when the nexthop attribute of an egress route is not in peering LAN. (required, no default value)

Definition at line 263 of file bgp-config.h.

◆ default_nexthop6_linklocal

uint8_t libbgp::BgpConfig::default_nexthop6_linklocal[16]

The default link-local IPv6 nexthop to use.

The link local nexhop. You may set this to all-zero if you don't want to send a link-local nexthop.

Default nexthop is used when sending routes to the peer. The nexthop value will remain unchanged if it is inside peering LAN. Default nexthop is used only when the nexthop attribute of an egress route is not in peering LAN. (required, no default value)

Definition at line 277 of file bgp-config.h.

◆ forced_default_nexthop4

bool libbgp::BgpConfig::forced_default_nexthop4

Forced IPv4 default nexthop.

If this is set to true, the default_nexthop4 configuration parameter will always be used as nexthop, regardless of the peering LAN. (for IBGP, this will only work if ibgp_alter_nexthop is set to true.) (default: false)

Examples:
route-event-bus.cc, and route-filter.cc.

Definition at line 243 of file bgp-config.h.

◆ forced_default_nexthop6

bool libbgp::BgpConfig::forced_default_nexthop6

Forced IPv6 default nexthop.

If this is set to true, the default_nexthop6 configuration parameter will always be used as nexthop, regardless of the peering LAN. (for IBGP, this will only work if ibgp_alter_nexthop is set to true.) (default: false)

Definition at line 287 of file bgp-config.h.

◆ ibgp_alter_nexthop

bool libbgp::BgpConfig::ibgp_alter_nexthop

Do alter_nexthop for IBGP sessions.

If true, libbgp will alter IBGP nexthop attribute the same way as EBGP.

(default: false)

Definition at line 339 of file bgp-config.h.

◆ in_filters4

BgpFilterRules libbgp::BgpConfig::in_filters4

IPv4 Ingress route filters.

Ingress route filters are applied on the routes received from the peer. (default: accept any)

Definition at line 53 of file bgp-config.h.

◆ in_filters6

BgpFilterRules libbgp::BgpConfig::in_filters6

IPv6 Ingress route filters.

Ingress route filters are applied on the routes received from the peer. (default: accept any)

Definition at line 69 of file bgp-config.h.

◆ log_handler

BgpLogHandler* libbgp::BgpConfig::log_handler

The log handler.

The log handler is invoked whenever BGP FSM needs to log information. If you set this to null, FSM will output to the stderr with log level INFO. (required, no default value)

Examples:
peer-and-print.cc, route-event-bus.cc, route-filter.cc, and route-server.cc.

Definition at line 94 of file bgp-config.h.

◆ mp_bgp_ipv4

bool libbgp::BgpConfig::mp_bgp_ipv4

Enable MP-BGP IPv4 support.

Set this parameter to true will enable IPv4 support with MP-BGP. Note that even without MP-BGP IPv4, IPv4 routing information will still be exchanged with normal BGP session. This should only be set when mp_bgp_ipv6 is set and you want to carry ipv4 routing infromation on the same session. (default: false)

Examples:
peer-and-print.cc, and route-filter.cc.

Definition at line 162 of file bgp-config.h.

◆ mp_bgp_ipv6

bool libbgp::BgpConfig::mp_bgp_ipv6

Enable MP-BGP IPv6 support.

Set this parameter to true will enable IPv6 support with MP-BGP. Setting this to true will disable IPv4 unless mp_bgp_ipv4 is also set to true. (default: false)

Examples:
peer-and-print.cc, and route-filter.cc.

Definition at line 171 of file bgp-config.h.

◆ no_autotick

bool libbgp::BgpConfig::no_autotick

Disable auto tick on message reception.

Set to true will disable auto FSM ticking when message received.

(default: false)

Definition at line 330 of file bgp-config.h.

◆ no_collision_detection

bool libbgp::BgpConfig::no_collision_detection

Disable collision detection.

Set this parameter to true will disable collision detection. (default: false)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 142 of file bgp-config.h.

◆ no_nexthop_check4

bool libbgp::BgpConfig::no_nexthop_check4

Disable IPv4 ingress nexthop validation.

If true, BGP FSM will accept route with any nexthop, regardless of the peering LAN. (default: false)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 222 of file bgp-config.h.

◆ no_nexthop_check6

bool libbgp::BgpConfig::no_nexthop_check6

Disable IPv6 ingress nexthop validation.

If true, BGP FSM will accept route with any nexthop, regardless of the peering LAN. (default: false)

Examples:
peer-and-print.cc.

Definition at line 252 of file bgp-config.h.

◆ out_filters4

BgpFilterRules libbgp::BgpConfig::out_filters4

IPv4 Egress route filters.

Egress route filters are applied when sending routes to the peer. (default: accept any)

Definition at line 61 of file bgp-config.h.

◆ out_filters6

BgpFilterRules libbgp::BgpConfig::out_filters6

IPv6 Ingress route filters.

Egress route filters are applied when sending routes to the peer. (default: accept any)

Definition at line 77 of file bgp-config.h.

◆ out_handler

BgpOutHandler* libbgp::BgpConfig::out_handler

The output handler.

The output handler is invoked whenever BGP FSM needs to write data. (required, no default value)

Examples:
peer-and-print.cc, route-event-bus.cc, route-filter.cc, and route-server.cc.

Definition at line 85 of file bgp-config.h.

◆ peering_lan4

Prefix4 libbgp::BgpConfig::peering_lan4

The prefix of the IPv4 peering LAN.

Peering LAN information is used to check the validity of the nexthop attribute of the received routes. Routes received from the peer with a nexthop outside the peering LAN will be ignored. When sending routes to peer, if nexthop attribute in RIB is not in peering LAN, default nexthop will be used. (required, no default value)

Definition at line 201 of file bgp-config.h.

◆ peering_lan6

Prefix6 libbgp::BgpConfig::peering_lan6

The prefix of the IPv6 peering LAN.

Peering LAN information is used to check the validity of the nexthop attribute of the received routes. Routes received from the peer with a nexthop outside the peering LAN will be ignored. When sending routes to peer, if nexthop attribute in RIB is not in peering LAN, default nexthop will be used. (required, no default value)

Definition at line 213 of file bgp-config.h.

◆ rev_bus

RouteEventBus* libbgp::BgpConfig::rev_bus

Pointer to the route event bus.

The route event bus is used to share information and communicate with other BGP FSMs. For example, route add/withdrawn events are sent to other FSMs with route event bus. Collision resolution also depends on the route event bus. You will need to create a route event bus object and pass it in as the configuration parameter for every FSMs. You may set route event bus to NULL if you are only using one FSM. (default: NULL)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 134 of file bgp-config.h.

◆ rib4

BgpRib4* libbgp::BgpConfig::rib4

Pointer to the IPv4 Routing Information Base object.

BGP FSM will use this RIB object to store routing information. If you would like to share RIB across different BGP FSMs, or pre-fill the RIB with some routes, you can create the RIB object yourself and pass it as configuration parameter here. If you set this to NULL, a new RIB will be created by BGP FSM. You can get it by calling BgpFsm::getRib4. (default: NULL)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 106 of file bgp-config.h.

◆ rib6

BgpRib6* libbgp::BgpConfig::rib6

Pointer to the IPv6 Routing Information Base object.

BGP FSM will use this RIB object to store routing information. If you would like to share RIB across different BGP FSMs, or pre-fill the RIB with some routes, you can create the RIB object yourself and pass it as configuration parameter here. If you set this to NULL, a new RIB will be created by BGP FSM. You can get it by calling BgpFsm::getRib6. (default: NULL)

Examples:
peer-and-print.cc.

Definition at line 118 of file bgp-config.h.

◆ use_4b_asn

bool libbgp::BgpConfig::use_4b_asn

Enable four octets ASN support (RFC 6793)

Set this parameter to true will eable four octets ASN support. (default: true)

Examples:
peer-and-print.cc, route-event-bus.cc, and route-filter.cc.

Definition at line 150 of file bgp-config.h.

◆ weight

int32_t libbgp::BgpConfig::weight

Weight of this BGP session.

Routes of session with higher weight will be prefered when makeing routing decision. (RIB lookup)

(default: 0)

Definition at line 321 of file bgp-config.h.


The documentation for this struct was generated from the following file: