summaryrefslogtreecommitdiffstats
path: root/zebra/rib.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index f3572ffa..c39afa73 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -60,9 +60,12 @@ struct rib
/* Type for this route. < ZEBRA_ROUTE_MAX */
u_int8_t type;
+ /* Scope for this route. */
+ u_int8_t scope;
+
/* Status Flags for the *route_node*, but kept in the head RIB.. */
u_char rn_status;
-#define RIB_ROUTE_QUEUED (1 << 0)
+#define RIB_ROUTE_QUEUED(x) (1 << (x))
/* Distance. */
u_char distance;
@@ -76,6 +79,7 @@ struct rib
/* RIB internal status */
u_char status;
#define RIB_ENTRY_REMOVED (1 << 0)
+#define RIB_ENTRY_PRESERVE (2 << 0)
/* Nexthop information. */
u_char nexthop_num;
@@ -83,6 +87,20 @@ struct rib
u_char nexthop_fib_num;
};
+/* meta-queue structure:
+ * sub-queue 0: connected, kernel
+ * sub-queue 1: static
+ * sub-queue 2: RIP, RIPng, OSPF, OSPF6, IS-IS
+ * sub-queue 3: iBGP, eBGP
+ * sub-queue 4: any other origin (if any)
+ */
+#define MQ_SIZE 5
+struct meta_queue
+{
+ struct list *subq[MQ_SIZE];
+ u_int32_t size; /* sum of lengths of all subqueues */
+};
+
/* Static route information. */
struct static_ipv4
{
@@ -207,7 +225,8 @@ struct vrf
struct route_table *stable[AFI_MAX][SAFI_MAX];
};
-extern struct nexthop *nexthop_ifindex_add (struct rib *, unsigned int);
+extern struct nexthop *nexthop_ifindex_add (struct rib *, unsigned int,
+ struct in_addr *);
extern struct nexthop *nexthop_ifname_add (struct rib *, char *);
extern struct nexthop *nexthop_blackhole_add (struct rib *);
extern struct nexthop *nexthop_ipv4_add (struct rib *, struct in_addr *,
@@ -236,7 +255,7 @@ extern struct route_table *vrf_static_table (afi_t afi, safi_t safi, u_int32_t i
extern int rib_add_ipv4 (int type, int flags, struct prefix_ipv4 *p,
struct in_addr *gate, struct in_addr *src,
unsigned int ifindex, u_int32_t vrf_id,
- u_int32_t, u_char);
+ u_int32_t metric, u_int8_t distance, u_int8_t scope);
extern int rib_add_ipv4_multipath (struct prefix_ipv4 *, struct rib *);