]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/interface.h
Merge pull request #5793 from ton31337/fix/formatting_show_bgp_summary_failed
[mirror_frr.git] / zebra / interface.h
index ce404e82537269a49ced567519399c8de4c5b4fa..b7e90a0c31edcbadbb9afd55f6872698fe606855 100644 (file)
@@ -27,6 +27,7 @@
 #include "hook.h"
 
 #include "zebra/zebra_l2.h"
+#include "zebra/zebra_nhg_private.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -46,7 +47,7 @@ extern "C" {
 struct rtadvconf {
        /* A flag indicating whether or not the router sends periodic Router
           Advertisements and responds to Router Solicitations.
-          Default: FALSE */
+          Default: false */
        int AdvSendAdvertisements;
 
        /* The maximum time allowed between sending unsolicited multicast
@@ -70,19 +71,19 @@ struct rtadvconf {
        /* Unsolicited Router Advertisements' interval timer. */
        int AdvIntervalTimer;
 
-       /* The TRUE/FALSE value to be placed in the "Managed address
+       /* The true/false value to be placed in the "Managed address
           configuration" flag field in the Router Advertisement.  See
           [ADDRCONF].
 
-          Default: FALSE */
+          Default: false */
        int AdvManagedFlag;
 
 
-       /* The TRUE/FALSE value to be placed in the "Other stateful
+       /* The true/false value to be placed in the "Other stateful
           configuration" flag field in the Router Advertisement.  See
           [ADDRCONF].
 
-          Default: FALSE */
+          Default: false */
        int AdvOtherConfigFlag;
 
        /* The value to be placed in MTU options sent by the router.  A
@@ -136,10 +137,10 @@ struct rtadvconf {
           included in the list of advertised prefixes. */
        struct list *AdvPrefixList;
 
-       /* The TRUE/FALSE value to be placed in the "Home agent"
+       /* The true/false value to be placed in the "Home agent"
           flag field in the Router Advertisement.  See [RFC6275 7.1].
 
-          Default: FALSE */
+          Default: false */
        int AdvHomeAgentFlag;
 #ifndef ND_RA_FLAG_HOME_AGENT
 #define ND_RA_FLAG_HOME_AGENT  0x20
@@ -159,10 +160,10 @@ struct rtadvconf {
        int HomeAgentLifetime;
 #define RTADV_MAX_HALIFETIME 65520 /* 18.2 hours */
 
-       /* The TRUE/FALSE value to insert or not an Advertisement Interval
+       /* The true/false value to insert or not an Advertisement Interval
           option. See [RFC 6275 7.3]
 
-          Default: FALSE */
+          Default: false */
        int AdvIntervalOption;
 
        /* The value to be placed in the Default Router Preference field of
@@ -188,6 +189,13 @@ struct rtadvconf {
         */
        struct list *AdvDNSSLList;
 
+       /*
+        * rfc4861 states RAs must be sent at least 3 seconds apart.
+        * We allow faster retransmits to speed up convergence but can
+        * turn that capability off to meet the rfc if needed.
+        */
+       bool UseFastRexmit; /* True if fast rexmits are enabled */
+
        uint8_t inFastRexmit; /* True if we're rexmits faster than usual */
 
        /* Track if RA was configured by BGP or by the Operator or both */
@@ -277,6 +285,15 @@ struct zebra_if {
        /* Installed addresses chains tree. */
        struct route_table *ipv4_subnets;
 
+       /* Nexthops pointing to this interface */
+       /**
+        * Any nexthop that we get should have an
+        * interface. When an interface goes down,
+        * we will use this list to update the nexthops
+        * pointing to it with that info.
+        */
+       struct nhg_connected_tree_head nhg_dependents;
+
        /* Information about up/down changes */
        unsigned int up_count;
        char up_last[QUAGGA_TIMESTAMP_LEN];
@@ -342,6 +359,9 @@ struct zebra_if {
        bool v6_2_v4_ll_neigh_entry;
        char neigh_mac[6];
        struct in6_addr v6_2_v4_ll_addr6;
+
+       /* The description of the interface */
+       char *desc;
 };
 
 DECLARE_HOOK(zebra_if_extra_info, (struct vty * vty, struct interface *ifp),
@@ -419,6 +439,15 @@ extern void if_handle_vrf_change(struct interface *ifp, vrf_id_t vrf_id);
 extern void zebra_if_update_link(struct interface *ifp, ifindex_t link_ifindex,
                                 ns_id_t ns_id);
 extern void zebra_if_update_all_links(void);
+extern void zebra_if_set_protodown(struct interface *ifp, bool down);
+
+/* Nexthop group connected functions */
+extern void if_nhg_dependents_add(struct interface *ifp,
+                                 struct nhg_hash_entry *nhe);
+extern void if_nhg_dependents_del(struct interface *ifp,
+                                 struct nhg_hash_entry *nhe);
+extern unsigned int if_nhg_dependents_count(const struct interface *ifp);
+extern bool if_nhg_dependents_is_empty(const struct interface *ifp);
 
 extern void vrf_add_update(struct vrf *vrfp);