summaryrefslogtreecommitdiff
path: root/zebra/zebra_static.h
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/zebra_static.h')
-rw-r--r--zebra/zebra_static.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/zebra/zebra_static.h b/zebra/zebra_static.h
index 5e3177e3b8..adc2efff58 100644
--- a/zebra/zebra_static.h
+++ b/zebra/zebra_static.h
@@ -31,6 +31,14 @@ struct static_nh_label
mpls_label_t label[2];
};
+typedef enum {
+ STATIC_IFINDEX,
+ STATIC_IPV4_GATEWAY,
+ STATIC_BLACKHOLE,
+ STATIC_IPV6_GATEWAY,
+ STATIC_IPV6_GATEWAY_IFINDEX,
+} zebra_static_types;
+
/* Static route information. */
struct static_route
{
@@ -48,12 +56,7 @@ struct static_route
route_tag_t tag;
/* Flag for this static route's type. */
- u_char type;
-#define STATIC_IFINDEX 1
-#define STATIC_IPV4_GATEWAY 2
-#define STATIC_BLACKHOLE 3
-#define STATIC_IPV6_GATEWAY 4
-#define STATIC_IPV6_GATEWAY_IFINDEX 5
+ zebra_static_types type;
/*
* Nexthop value.
@@ -80,12 +83,15 @@ struct static_route
};
extern void
-static_install_route (afi_t afi, safi_t safi, struct prefix *p, struct static_route *si);
+static_install_route (afi_t afi, safi_t safi, struct prefix *p,
+ struct prefix_ipv6 *src_p, struct static_route *si);
extern void
-static_uninstall_route (afi_t afi, safi_t safi, struct prefix *p, struct static_route *si);
+static_uninstall_route (afi_t afi, safi_t safi, struct prefix *p,
+ struct prefix_ipv6 *src_p, struct static_route *si);
extern int
static_add_route (afi_t, safi_t safi, u_char type, struct prefix *p,
+ struct prefix_ipv6 *src_p,
union g_addr *gate, ifindex_t ifindex,
const char *ifname, u_char flags, route_tag_t tag,
u_char distance, struct zebra_vrf *zvrf,
@@ -93,6 +99,7 @@ static_add_route (afi_t, safi_t safi, u_char type, struct prefix *p,
extern int
static_delete_route (afi_t, safi_t safi, u_char type, struct prefix *p,
+ struct prefix_ipv6 *src_p,
union g_addr *gate, ifindex_t ifindex, route_tag_t tag,
u_char distance, struct zebra_vrf *zvrf,
struct static_nh_label *snh_label);
@@ -106,6 +113,7 @@ zebra_static_ipv4 (struct vty *vty, safi_t safi, int add_cmd,
int
static_ipv6_func (struct vty *vty, int add_cmd, const char *dest_str,
+ const char *src_str,
const char *gate_str, const char *ifname,
const char *flag_str, const char *tag_str,
const char *distance_str, const char *vrf_id_str,