mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 14:17:20 +00:00
static: Start state tracking to know what we think the route is doing
We need to track the state information in staticd of what we think the route is. Add the enum for this state and place it into the si. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
6f5db0b1ab
commit
0ed857ab63
@ -44,6 +44,26 @@ typedef enum {
|
|||||||
STATIC_IPV6_GATEWAY_IFNAME,
|
STATIC_IPV6_GATEWAY_IFNAME,
|
||||||
} static_types;
|
} static_types;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Route Creation gives us:
|
||||||
|
* START -> Initial State, only exit is when we send the route to
|
||||||
|
* zebra for installation
|
||||||
|
* When we send the route to Zebra move to SENT_TO_ZEBRA
|
||||||
|
* SENT_TO_ZEBRA -> A way to notice that we've sent the route to zebra
|
||||||
|
* But have not received a response on it's status yet
|
||||||
|
* After The response from zebra we move to INSTALLED or FAILED
|
||||||
|
* INSTALLED -> Route was accepted
|
||||||
|
* FAILED -> Route was rejected
|
||||||
|
* When we receive notification about a nexthop that a route uses
|
||||||
|
* We move the route back to START and initiate the process again.
|
||||||
|
*/
|
||||||
|
enum static_install_states {
|
||||||
|
STATIC_START,
|
||||||
|
STATIC_SENT_TO_ZEBRA,
|
||||||
|
STATIC_INSTALLED,
|
||||||
|
STATIC_NOT_INSTALLED,
|
||||||
|
};
|
||||||
|
|
||||||
/* Static route information. */
|
/* Static route information. */
|
||||||
struct static_route {
|
struct static_route {
|
||||||
/* For linked list. */
|
/* For linked list. */
|
||||||
@ -55,6 +75,12 @@ struct static_route {
|
|||||||
vrf_id_t nh_vrf_id;
|
vrf_id_t nh_vrf_id;
|
||||||
char nh_vrfname[VRF_NAMSIZ + 1];
|
char nh_vrfname[VRF_NAMSIZ + 1];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* States that we walk the route through
|
||||||
|
* To know where we are.
|
||||||
|
*/
|
||||||
|
enum static_install_states state;
|
||||||
|
|
||||||
/* Administrative distance. */
|
/* Administrative distance. */
|
||||||
uint8_t distance;
|
uint8_t distance;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user