]> git.proxmox.com Git - mirror_frr.git/blobdiff - staticd/static_routes.h
Merge pull request #5213 from mjstapp/fix_sysctl_h
[mirror_frr.git] / staticd / static_routes.h
index 6036bfe396970df625915b759ee4e68f5e909233..6414947b1601245a0dcc9b1cbf4d88605ea7a2c6 100644 (file)
@@ -44,6 +44,26 @@ typedef enum {
        STATIC_IPV6_GATEWAY_IFNAME,
 } 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. */
 struct static_route {
        /* For linked list. */
@@ -55,6 +75,12 @@ struct static_route {
        vrf_id_t nh_vrf_id;
        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. */
        uint8_t distance;