diff options
author | Jan Moskyto Matejka <mq@ucw.cz> | 2016-05-06 15:48:35 +0200 |
---|---|---|
committer | Jan Moskyto Matejka <mq@ucw.cz> | 2016-12-22 13:01:06 +0100 |
commit | 4e276a8920ed0496836f002f144943ab42f120f6 (patch) | |
tree | b2d24394f036cbd825330e0087a7f9f4ca167174 /proto/static/static.h | |
parent | b7605d5c953902b461e5c9e87aa3dfa60ddce5bc (diff) |
Merged multipath and single-path data structures.
Dropped struct mpnh and mpnh_*()
Now struct nexthop exists, nexthop_*(), and also included struct nexthop
into struct rta.
Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is needed
to distinguish between these two cases, RTD_DEVICE is equivalent to
IPA_ZERO(a->nh.gw), RTD_ROUTER is then IPA_NONZERO(a->nh.gw).
From now on, we also explicitely want C99 compatible compiler. We assume
that this 20-year norm should be known almost everywhere.
Diffstat (limited to 'proto/static/static.h')
-rw-r--r-- | proto/static/static.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/proto/static/static.h b/proto/static/static.h index 51486e83..418b3076 100644 --- a/proto/static/static.h +++ b/proto/static/static.h @@ -32,14 +32,19 @@ struct static_route { struct iface *via_if; /* Destination iface, for link-local vias */ struct neighbor *neigh; byte *if_name; /* Name for RTD_DEVICE routes */ - struct static_route *mp_next; /* Nexthops for RTD_MULTIPATH routes */ + struct static_route *mp_next; /* Nexthops for multipath routes */ struct f_inst *cmds; /* List of commands for setting attributes */ - int installed; /* Installed in rt table, -1 for reinstall */ + u32 state; /* Current state: STS_* */ int use_bfd; /* Configured to use BFD */ int weight; /* Multipath next hop weight */ struct bfd_request *bfd_req; /* BFD request, if BFD is used */ }; +#define STS_INSTALLED 0x1 +#define STS_INSTALLED_ANY 0x2 +#define STS_WANT 0x4 +#define STS_FORCE 0x8 + /* Dummy nodes (parts of multipath route) abuses masklen field for weight and if_name field for a ptr to the master (RTD_MULTIPATH) node. */ |