]> git.proxmox.com Git - mirror_frr.git/blobdiff - zebra/rtadv.h
Merge pull request #5451 from opensourcerouting/rcu-log
[mirror_frr.git] / zebra / rtadv.h
index d692ef241748fcca6bc2a139b45f44abb4d02d3d..68a5bbcdbe331ffdb73bf6ff40968112517aa030 100644 (file)
@@ -37,6 +37,9 @@ struct rtadv_prefix {
        /* Prefix to be advertised. */
        struct prefix_ipv6 prefix;
 
+       /* The prefix was manually/automatically defined. */
+       int AdvPrefixCreate;
+
        /* The value to be placed in the Valid Lifetime in the Prefix */
        uint32_t AdvValidLifetime;
 #define RTADV_VALID_LIFETIME 2592000
@@ -59,6 +62,11 @@ struct rtadv_prefix {
 #endif
 };
 
+/* RFC4861 minimum delay between RAs  */
+#ifndef MIN_DELAY_BETWEEN_RAS
+#define MIN_DELAY_BETWEEN_RAS        3000
+#endif
+
 /* RFC4584 Extension to Sockets API for Mobile IPv6 */
 
 #ifndef ND_OPT_ADV_INTERVAL
@@ -126,20 +134,34 @@ struct nd_opt_dnssl { /* DNS search list option [RFC8106 5.2] */
 } __attribute__((__packed__));
 #endif
 
-extern const char *rtadv_pref_strs[];
-
 #endif /* HAVE_RTADV */
 
+/*
+ * ipv6 nd prefixes can be manually defined, derived from the kernel interface
+ * configs or both.  If both, manual flag/timer settings are used.
+ */
+enum ipv6_nd_prefix_source {
+       PREFIX_SRC_NONE = 0,
+       PREFIX_SRC_MANUAL,
+       PREFIX_SRC_AUTO,
+       PREFIX_SRC_BOTH,
+};
+
 typedef enum {
        RA_ENABLE = 0,
        RA_SUPPRESS,
 } ipv6_nd_suppress_ra_status;
 
 extern void rtadv_init(struct zebra_vrf *zvrf);
-extern void rtadv_terminate(struct zebra_vrf *zvrf);
+extern void rtadv_vrf_terminate(struct zebra_vrf *zvrf);
+extern void rtadv_terminate(void);
+extern void rtadv_stop_ra(struct interface *ifp);
+extern void rtadv_stop_ra_all(void);
 extern void rtadv_cmd_init(void);
 extern void zebra_interface_radv_disable(ZAPI_HANDLER_ARGS);
 extern void zebra_interface_radv_enable(ZAPI_HANDLER_ARGS);
+extern void rtadv_add_prefix(struct zebra_if *zif, const struct prefix_ipv6 *p);
+extern void rtadv_delete_prefix(struct zebra_if *zif, const struct prefix *p);
 
 #ifdef __cplusplus
 }