#include "hook.h"
#include "zebra/zebra_l2.h"
+#include "zebra/zebra_nhg_private.h"
#ifdef __cplusplus
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
/* 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
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
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
*/
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 */
/* 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];
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);
#ifdef HAVE_PROC_NET_DEV