]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/interface.h
*: conform with COMMUNITY.md formatting rules, via 'make indent'
[mirror_frr.git] / zebra / interface.h
index 7b56dcd4a40c7263f1b1ba1052963153df1fc4d3..9f109fc05f1837c1a53c4fbeb4829c9a269be4be 100644 (file)
@@ -60,8 +60,6 @@ struct rtadvconf {
 
           Default: 0.33 * MaxRtrAdvInterval */
        int MinRtrAdvInterval; /* This field is currently unused. */
-                              /* $FRR indent$ */
-                              /* clang-format off */
 #define RTADV_MIN_RTR_ADV_INTERVAL (0.33 * RTADV_MAX_RTR_ADV_INTERVAL)
 
        /* Unsolicited Router Advertisements' interval timer. */
@@ -170,10 +168,14 @@ struct rtadvconf {
 #define RTADV_PREF_MEDIUM 0x0 /* Per RFC4191. */
 
        u_char inFastRexmit; /* True if we're rexmits faster than usual */
-       u_char configured;   /* Has operator configured RA? */
-       int
-               NumFastReXmitsRemain; /* Loaded first with number of fast
-                                        rexmits to do */
+
+       /* Track if RA was configured by BGP or by the Operator or both */
+       u_char ra_configured;     /* Was RA configured? */
+#define BGP_RA_CONFIGURED (1<<0)  /* BGP configured RA? */
+#define VTY_RA_CONFIGURED (1<<1)  /* Operator configured RA? */
+#define VTY_RA_INTERVAL_CONFIGURED (1<<2)  /* Operator configured RA interval */
+       int NumFastReXmitsRemain; /* Loaded first with number of fast
+                                    rexmits to do */
 
 #define RTADV_FAST_REXMIT_PERIOD 1 /* 1 sec */
 #define RTADV_NUM_FAST_REXMITS   4 /* Fast Rexmit RA 4 times on certain events */
@@ -183,12 +185,12 @@ struct rtadvconf {
 
 /* Zebra interface type - ones of interest. */
 typedef enum {
-       ZEBRA_IF_VXLAN,   /* VxLAN interface */
-       ZEBRA_IF_VRF,     /* VRF device */
-       ZEBRA_IF_BRIDGE,  /* bridge device */
-       ZEBRA_IF_VLAN,    /* VLAN sub-interface */
-       ZEBRA_IF_MACVLAN, /* MAC VLAN interface*/
-       ZEBRA_IF_OTHER,   /* Anything else */
+       ZEBRA_IF_OTHER = 0, /* Anything else */
+       ZEBRA_IF_VXLAN,     /* VxLAN interface */
+       ZEBRA_IF_VRF,       /* VRF device */
+       ZEBRA_IF_BRIDGE,    /* bridge device */
+       ZEBRA_IF_VLAN,      /* VLAN sub-interface */
+       ZEBRA_IF_MACVLAN,   /* MAC VLAN interface*/
 } zebra_iftype_t;
 
 /* Zebra "slave" interface type */
@@ -268,12 +270,14 @@ struct zebra_if {
        /* Link fields - for sub-interfaces. */
        ifindex_t link_ifindex;
        struct interface *link;
+
+       struct thread *speed_update;
 };
 
-DECLARE_HOOK(zebra_if_extra_info, (struct vty *vty, struct interface *ifp),
-                                 (vty, ifp))
-DECLARE_HOOK(zebra_if_config_wr, (struct vty *vty, struct interface *ifp),
-                                (vty, ifp))
+DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
+            (vty, ifp))
+DECLARE_HOOK(zebra_if_config_wr, (struct vty * vty, struct interface *ifp),
+            (vty, ifp))
 
 static inline void zebra_if_set_ziftype(struct interface *ifp,
                                        zebra_iftype_t zif_type,
@@ -308,6 +312,8 @@ static inline void zebra_if_set_ziftype(struct interface *ifp,
 #define IS_ZEBRA_IF_VRF_SLAVE(ifp)                                             \
        (((struct zebra_if *)(ifp->info))->zif_slave_type == ZEBRA_IF_SLAVE_VRF)
 
+extern void zebra_if_init(void);
+
 extern struct interface *if_lookup_by_index_per_ns(struct zebra_ns *,
                                                   u_int32_t);
 extern struct interface *if_lookup_by_name_per_ns(struct zebra_ns *,