summaryrefslogtreecommitdiff
path: root/proto/static/static.h
diff options
context:
space:
mode:
authorJan Moskyto Matejka <mq@ucw.cz>2016-06-13 15:49:53 +0200
committerJan Moskyto Matejka <mq@ucw.cz>2016-12-22 21:38:33 +0100
commitf2010f9c65ca69584c34c762fb3e5e957958478e (patch)
tree821f3c498cef0e17feb50e5074ac29854f991175 /proto/static/static.h
parent33ad6e0188b56f682a012ca1b782812c96285d51 (diff)
Static: Protocol rework wrt. struct nexthop changes; MPLS label support
Diffstat (limited to 'proto/static/static.h')
-rw-r--r--proto/static/static.h17
1 files changed, 10 insertions, 7 deletions
diff --git a/proto/static/static.h b/proto/static/static.h
index 418b3076..aeb9660a 100644
--- a/proto/static/static.h
+++ b/proto/static/static.h
@@ -15,7 +15,8 @@
struct static_config {
struct proto_config c;
list iface_routes; /* Routes to search on interface events */
- list other_routes; /* Routes hooked to neighbor cache and reject routes */
+ list neigh_routes; /* Routes to search on neighbor events */
+ list other_routes; /* Non-nexthop routes */
int check_link; /* Whether iface link state is used */
struct rtable_config *igp_table; /* Table used for recursive next hop lookups */
};
@@ -29,21 +30,23 @@ struct static_route {
net_addr *net; /* Network we route */
int dest; /* Destination type (RTD_*) */
ip_addr via; /* Destination router */
- struct iface *via_if; /* Destination iface, for link-local vias */
+ struct iface *iface; /* Destination iface, for link-local vias or device routes */
struct neighbor *neigh;
- byte *if_name; /* Name for RTD_DEVICE routes */
+ byte *if_name; /* Name for device routes */
struct static_route *mp_next; /* Nexthops for multipath routes */
+ struct static_route *mp_head; /* First nexthop of this route */
struct f_inst *cmds; /* List of commands for setting attributes */
u32 state; /* Current state: STS_* */
- int use_bfd; /* Configured to use BFD */
int weight; /* Multipath next hop weight */
+ byte use_bfd; /* Configured to use BFD */
+ byte label_count; /* Number of labels in stack */
struct bfd_request *bfd_req; /* BFD request, if BFD is used */
+ u32 *label_stack; /* Label stack if label_count > 0 */
};
#define STS_INSTALLED 0x1
-#define STS_INSTALLED_ANY 0x2
-#define STS_WANT 0x4
-#define STS_FORCE 0x8
+#define STS_WANT 0x2
+#define STS_FORCE 0x4
/* Dummy nodes (parts of multipath route) abuses masklen field for weight
and if_name field for a ptr to the master (RTD_MULTIPATH) node. */