From 81dfcaa2e27d53f4eb61c549e03065dcb1b8eec3 Mon Sep 17 00:00:00 2001 From: hasso Date: Sun, 25 May 2003 19:21:25 +0000 Subject: Route (reject|blackhole) support from 6Wind patch. --- zebra/rib.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'zebra/rib.h') diff --git a/zebra/rib.h b/zebra/rib.h index f5012610..d416c152 100644 --- a/zebra/rib.h +++ b/zebra/rib.h @@ -76,7 +76,6 @@ struct static_ipv4 u_char type; #define STATIC_IPV4_GATEWAY 1 #define STATIC_IPV4_IFNAME 2 -#define STATIC_IPV4_BLACKHOLE 3 /* Nexthop value. */ union @@ -84,6 +83,13 @@ struct static_ipv4 struct in_addr ipv4; char *ifname; } gate; + + /* bit flags */ + u_char flags; +/* + see ZEBRA_FLAG_REJECT + ZEBRA_FLAG_BLACKHOLE + */ }; #ifdef HAVE_IPV6 @@ -106,6 +112,13 @@ struct static_ipv6 /* Nexthop value. */ struct in6_addr ipv6; char *ifname; + + /* bit flags */ + u_char flags; +/* + see ZEBRA_FLAG_REJECT + ZEBRA_FLAG_BLACKHOLE + */ }; #endif /* HAVE_IPV6 */ @@ -124,7 +137,6 @@ struct nexthop #define NEXTHOP_TYPE_IPV6 6 /* IPv6 nexthop. */ #define NEXTHOP_TYPE_IPV6_IFINDEX 7 /* IPv6 nexthop with ifindex. */ #define NEXTHOP_TYPE_IPV6_IFNAME 8 /* IPv6 nexthop with ifname. */ -#define NEXTHOP_TYPE_BLACKHOLE 9 /* Null0 nexthop. */ u_char flags; #define NEXTHOP_FLAG_ACTIVE (1 << 0) /* This nexthop is alive. */ @@ -182,7 +194,6 @@ struct vrf struct nexthop *nexthop_ifindex_add (struct rib *, unsigned int); struct nexthop *nexthop_ifname_add (struct rib *, char *); -struct nexthop *nexthop_blackhole_add (struct rib *); struct nexthop *nexthop_ipv4_add (struct rib *, struct in_addr *); #ifdef HAVE_IPV6 struct nexthop *nexthop_ipv6_add (struct rib *, struct in6_addr *); @@ -217,7 +228,7 @@ void rib_init (); int static_add_ipv4 (struct prefix *p, struct in_addr *gate, char *ifname, - u_char distance, u_int32_t vrf_id); + u_char flags, u_char distance, u_int32_t vrf_id); int static_delete_ipv4 (struct prefix *p, struct in_addr *gate, char *ifname, @@ -240,7 +251,7 @@ extern struct route_table *rib_table_ipv6; int static_add_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate, - char *ifname, u_char distance, u_int32_t vrf_id); + char *ifname, u_char flags, u_char distance, u_int32_t vrf_id); int static_delete_ipv6 (struct prefix *p, u_char type, struct in6_addr *gate, -- cgit v1.2.1