summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_route.h
diff options
context:
space:
mode:
Diffstat (limited to 'bgpd/bgp_route.h')
-rw-r--r--bgpd/bgp_route.h38
1 files changed, 35 insertions, 3 deletions
diff --git a/bgpd/bgp_route.h b/bgpd/bgp_route.h
index c8037592..b54a7941 100644
--- a/bgpd/bgp_route.h
+++ b/bgpd/bgp_route.h
@@ -21,8 +21,11 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#ifndef _QUAGGA_BGP_ROUTE_H
#define _QUAGGA_BGP_ROUTE_H
+#include "queue.h"
#include "bgp_table.h"
+struct bgp_nexthop_cache;
+
/* Ancillary information to struct bgp_info,
* used for uncommonly used data (aggregation, MPLS, etc.)
* and lazily allocated to save memory.
@@ -47,7 +50,16 @@ struct bgp_info
/* For linked list. */
struct bgp_info *next;
struct bgp_info *prev;
-
+
+ /* For nexthop linked list */
+ LIST_ENTRY(bgp_info) nh_thread;
+
+ /* Back pointer to the prefix node */
+ struct bgp_node *net;
+
+ /* Back pointer to the nexthop structure */
+ struct bgp_nexthop_cache *nexthop;
+
/* Peer structure. */
struct peer *peer;
@@ -127,6 +139,10 @@ struct bgp_static
u_char tag[3];
};
+#define BGP_INFO_COUNTABLE(BI) \
+ (! CHECK_FLAG ((BI)->flags, BGP_INFO_HISTORY) \
+ && ! CHECK_FLAG ((BI)->flags, BGP_INFO_REMOVED))
+
/* Flags which indicate a route is unuseable in some form */
#define BGP_INFO_UNUSEABLE \
(BGP_INFO_HISTORY|BGP_INFO_DAMPED|BGP_INFO_REMOVED)
@@ -172,7 +188,15 @@ enum bgp_clear_route_type
BGP_CLEAR_ROUTE_MY_RSCLIENT
};
+enum bgp_path_type
+{
+ BGP_PATH_ALL,
+ BGP_PATH_BESTPATH,
+ BGP_PATH_MULTIPATH
+};
+
/* Prototypes. */
+extern void bgp_process_queue_init (void);
extern void bgp_route_init (void);
extern void bgp_route_finish (void);
extern void bgp_cleanup_routes (void);
@@ -201,8 +225,8 @@ extern int bgp_nlri_parse_ip (struct peer *, struct attr *, struct bgp_nlri *);
extern int bgp_maximum_prefix_overflow (struct peer *, afi_t, safi_t, int);
extern void bgp_redistribute_add (struct prefix *, const struct in_addr *,
- const struct in6_addr *,
- u_int32_t, u_char);
+ const struct in6_addr *, unsigned int ifindex,
+ u_int32_t, u_char, u_short);
extern void bgp_redistribute_delete (struct prefix *, u_char);
extern void bgp_redistribute_withdraw (struct bgp *, afi_t, int);
@@ -226,6 +250,14 @@ extern int bgp_withdraw (struct peer *, struct prefix *, struct attr *,
/* for bgp_nexthop and bgp_damp */
extern void bgp_process (struct bgp *, struct bgp_node *, afi_t, safi_t);
+
+/*
+ * Add an end-of-initial-update marker to the process queue. This is just a
+ * queue element with NULL bgp node.
+ */
+extern void bgp_add_eoiu_mark (struct bgp *, bgp_table_t);
+extern int bgp_config_write_table_map (struct vty *, struct bgp *, afi_t, safi_t,
+ int *);
extern int bgp_config_write_network (struct vty *, struct bgp *, afi_t, safi_t, int *);
extern int bgp_config_write_distance (struct vty *, struct bgp *);