summaryrefslogtreecommitdiff
path: root/zebra/rib.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/rib.h')
-rw-r--r--zebra/rib.h75
1 files changed, 6 insertions, 69 deletions
diff --git a/zebra/rib.h b/zebra/rib.h
index 095b9c6f8f..32f370f9ef 100644
--- a/zebra/rib.h
+++ b/zebra/rib.h
@@ -175,51 +175,6 @@ typedef struct rib_dest_t_
#define RNODE_FOREACH_RIB_SAFE(rn, rib, next) \
RIB_DEST_FOREACH_ROUTE_SAFE (rib_dest_from_rnode (rn), rib, next)
-/* Static route information. */
-struct static_route
-{
- /* For linked list. */
- struct static_route *prev;
- struct static_route *next;
-
- /* VRF identifier. */
- vrf_id_t vrf_id;
-
- /* Administrative distance. */
- u_char distance;
-
- /* Tag */
- u_short tag;
-
- /* Flag for this static route's type. */
- u_char type;
-#define STATIC_IFINDEX 1
-#define STATIC_IPV4_GATEWAY 2
-#define STATIC_IPV4_BLACKHOLE 3
-#define STATIC_IPV6_GATEWAY 4
-#define STATIC_IPV6_GATEWAY_IFINDEX 5
-
- /*
- * Nexthop value.
- *
- * Under IPv4 addr and ifindex are
- * used independentyly.
- * STATIC_IPV4_GATEWAY uses addr
- * STATIC_IFINDEX uses ifindex
- */
- union g_addr addr;
- ifindex_t ifindex;
-
- char ifname[INTERFACE_NAMSIZ + 1];
-
- /* bit flags */
- u_char flags;
-/*
- see ZEBRA_FLAG_REJECT
- ZEBRA_FLAG_BLACKHOLE
- */
-};
-
/* The following for loop allows to iterate over the nexthop
* structure of routes.
*
@@ -365,6 +320,7 @@ extern int rib_lookup_ipv4_route (struct prefix_ipv4 *, union sockunion *,
#define ZEBRA_RIB_FOUND_CONNECTED 2
#define ZEBRA_RIB_NOTFOUND 3
+extern void rib_nexthop_delete (struct rib *rib, struct nexthop *nexthop);
extern struct nexthop *rib_nexthop_ipv6_add (struct rib *, struct in6_addr *);
extern struct nexthop *rib_nexthop_ipv6_ifindex_add (struct rib *rib,
struct in6_addr *ipv6,
@@ -374,6 +330,11 @@ extern int is_zebra_valid_kernel_table(u_int32_t table_id);
extern int is_zebra_main_routing_table(u_int32_t table_id);
extern int zebra_check_addr (struct prefix *p);
+extern void rib_addnode (struct route_node *rn, struct rib *rib, int process);
+extern void rib_delnode (struct route_node *rn, struct rib *rib);
+extern int rib_install_kernel (struct route_node *rn, struct rib *rib, int update);
+extern int rib_uninstall_kernel (struct route_node *rn, struct rib *rib);
+
/* NOTE:
* All rib_add_ipv[46]* functions will not just add prefix into RIB, but
* also implicitly withdraw equal prefix of same type. */
@@ -404,20 +365,6 @@ extern void rib_init (void);
extern unsigned long rib_score_proto (u_char proto, u_short instance);
extern void rib_queue_add (struct route_node *rn);
-extern void
-static_install_route (afi_t afi, safi_t safi, struct prefix *p, struct static_route *si);
-extern void
-static_uninstall_route (afi_t afi, safi_t safi, struct prefix *p, struct static_route *si);
-
-extern int
-static_add_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, ifindex_t ifindex,
- const char *ifname, u_char flags, u_short tag,
- u_char distance, struct zebra_vrf *zvrf);
-
-extern int
-static_delete_ipv4 (safi_t safi, struct prefix *p, struct in_addr *gate, ifindex_t ifindex,
- u_short tag, u_char distance, struct zebra_vrf *zvrf);
-
extern int
rib_add_ipv6 (int type, u_short instance, int flags, struct prefix_ipv6 *p,
struct in6_addr *gate, ifindex_t ifindex, vrf_id_t vrf_id,
@@ -436,19 +383,9 @@ extern struct rib *rib_match_ipv6 (struct in6_addr *, vrf_id_t);
extern struct route_table *rib_table_ipv6;
extern int
-static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
- ifindex_t ifindex, const char *ifname, u_char flags,
- u_short tag, u_char distance, struct zebra_vrf *zvrf);
-
-extern int
rib_add_ipv6_multipath (struct prefix *, struct rib *, safi_t,
ifindex_t);
-extern int
-static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate,
- ifindex_t ifindex, u_short tag, u_char distance,
- struct zebra_vrf *zvrf);
-
extern int rib_gc_dest (struct route_node *rn);
extern struct route_table *rib_tables_iter_next (rib_tables_iter_t *iter);