diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-05-08 07:58:32 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-07-29 12:37:24 -0400 |
| commit | 7e24fdf333e8ffe78403788d824eae110c6e65bf (patch) | |
| tree | 08564ff89be16bb9928acb85ffdd05d7e31a196f /zebra/zebra_static.h | |
| parent | f23cbcda591480973f0be795d487c9268cb667ec (diff) | |
staticd: Start the addition of a staticd
This is the start of separating out the static
handling code from zebra -> staticd. This will
help simplify the zebra code and isolate static
route handling to it's own code base.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/zebra_static.h')
| -rw-r--r-- | zebra/zebra_static.h | 89 |
1 files changed, 0 insertions, 89 deletions
diff --git a/zebra/zebra_static.h b/zebra/zebra_static.h index 0be434fff2..4885b1b8fd 100644 --- a/zebra/zebra_static.h +++ b/zebra/zebra_static.h @@ -22,93 +22,4 @@ #ifndef __ZEBRA_STATIC_H__ #define __ZEBRA_STATIC_H__ -#include "zebra/zebra_mpls.h" - -/* Static route label information */ -struct static_nh_label { - uint8_t num_labels; - uint8_t reserved[3]; - mpls_label_t label[MPLS_MAX_LABELS]; -}; - -enum static_blackhole_type { - STATIC_BLACKHOLE_DROP = 0, - STATIC_BLACKHOLE_NULL, - STATIC_BLACKHOLE_REJECT -}; - -typedef enum { - STATIC_IFNAME, - STATIC_IPV4_GATEWAY, - STATIC_IPV4_GATEWAY_IFNAME, - STATIC_BLACKHOLE, - STATIC_IPV6_GATEWAY, - STATIC_IPV6_GATEWAY_IFNAME, -} zebra_static_types; - -/* Static route information. */ -struct static_route { - /* For linked list. */ - struct static_route *prev; - struct static_route *next; - - /* VRF identifier. */ - vrf_id_t vrf_id; - vrf_id_t nh_vrf_id; - char nh_vrfname[VRF_NAMSIZ + 1]; - - /* Administrative distance. */ - uint8_t distance; - - /* Tag */ - route_tag_t tag; - - /* Flag for this static route's type. */ - zebra_static_types type; - - /* - * Nexthop value. - */ - enum static_blackhole_type bh_type; - union g_addr addr; - ifindex_t ifindex; - - char ifname[INTERFACE_NAMSIZ + 1]; - - /* Label information */ - struct static_nh_label snh_label; - - /* Table Information */ - uint32_t table_id; -}; - -extern void static_install_route(afi_t afi, safi_t safi, const struct prefix *p, - const struct prefix_ipv6 *src_p, - struct static_route *si); -extern void static_uninstall_route(afi_t afi, safi_t safi, - const struct prefix *p, - const struct prefix_ipv6 *src_p, - struct static_route *si); - -extern int static_add_route(afi_t, safi_t safi, uint8_t type, struct prefix *p, - struct prefix_ipv6 *src_p, union g_addr *gate, - const char *ifname, - enum static_blackhole_type bh_type, route_tag_t tag, - uint8_t distance, struct zebra_vrf *zvrf, - struct zebra_vrf *nh_zvrf, - struct static_nh_label *snh_label, - uint32_t table_id); - -extern int static_delete_route(afi_t, safi_t safi, uint8_t type, - struct prefix *p, struct prefix_ipv6 *src_p, - union g_addr *gate, const char *ifname, - route_tag_t tag, uint8_t distance, - struct zebra_vrf *zvrf, - struct static_nh_label *snh_label, - uint32_t table_id); - -extern void static_ifindex_update(struct interface *ifp, bool up); - -extern void static_cleanup_vrf_ids(struct zebra_vrf *zvrf); -extern void static_fixup_vrf_ids(struct zebra_vrf *zvrf); #endif |
