#define OSPF6_LSTYPE_TYPE_7 0x2007
#define OSPF6_LSTYPE_LINK 0x0008
#define OSPF6_LSTYPE_INTRA_PREFIX 0x2009
-#define OSPF6_LSTYPE_SIZE 0x000a
+#define OSPF6_LSTYPE_GRACE_LSA 0x000b
+#define OSPF6_LSTYPE_SIZE 0x000c
/* Masks for LS Type : RFC 2740 A.4.2.1 "LS type" */
#define OSPF6_LSTYPE_UBIT_MASK 0x8000
/* lsa instance */
struct ospf6_lsa_header *header;
+
+ /*For topo chg detection in HELPER role*/
+ bool tobe_acknowledged;
};
#define OSPF6_LSA_HEADERONLY 0x01
continue; \
}
+#define CHECK_LSA_TOPO_CHG_ELIGIBLE(type) \
+ ((type == OSPF6_LSTYPE_ROUTER) \
+ || (type == OSPF6_LSTYPE_NETWORK) \
+ || (type == OSPF6_LSTYPE_INTER_PREFIX) \
+ || (type == OSPF6_LSTYPE_INTER_ROUTER) \
+ || (type == OSPF6_LSTYPE_AS_EXTERNAL) \
+ || (type == OSPF6_LSTYPE_TYPE_7) \
+ || (type == OSPF6_LSTYPE_INTRA_PREFIX))
/* Function Prototypes */
extern const char *ospf6_lstype_name(uint16_t type);
#define IS_OSPF6_DEBUG_NEIGHBOR(level) \
(conf_debug_ospf6_neighbor & OSPF6_DEBUG_NEIGHBOR_##level)
+struct ospf6_helper_info {
+
+ /* Grace interval received from
+ * Restarting Router.
+ */
+ uint32_t recvd_grace_period;
+
+ /* Grace interval used for grace
+ * gracetimer.
+ */
+ uint32_t actual_grace_period;
+
+ /* Grace timer,This Router acts as
+ * helper until this timer until
+ * this timer expires.
+ */
+ struct thread *t_grace_timer;
+
+ /* Helper status */
+ uint32_t gr_helper_status;
+
+ /* Helper exit reason*/
+ uint32_t helper_exit_reason;
+
+ /* Planned/Unplanned restart*/
+ uint32_t gr_restart_reason;
+
+
+ /* Helper rejected reason */
+ uint32_t rejected_reason;
+};
+
/* Neighbor structure */
struct ospf6_neighbor {
/* Neighbor Router ID String */
/* BFD information */
struct bfd_session_params *bfd_session;
+
+ /* ospf6 graceful restart HELPER info */
+ struct ospf6_helper_info gr_helper_info;
};
/* Neighbor state */
#define ROUTEMAP(R) (R->route_map.map)
};
+struct ospf6_gr_helper {
+ /* Gracefull restart Helper supported configs*/
+ /* Supported grace interval*/
+ uint32_t supported_grace_time;
+
+ /* Helper support
+ * Supported : True
+ * Not Supported : False.
+ */
+ bool is_helper_supported;
+
+ /* Support for strict LSA check.
+ * if it is set,Helper aborted
+ * upon a TOPO change.
+ */
+ bool strict_lsa_check;
+
+ /* Support as HELPER only for
+ * planned restarts.
+ */
+ bool only_planned_restart;
+
+ /* This list contains the advertisement
+ * routerids for which Helper support is
+ * enabled.
+ */
+ struct hash *enable_rtr_list;
+
+ /* HELPER for number of active
+ * RESTARTERs.
+ */
+ int active_restarter_cnt;
+
+ /* last HELPER exit reason */
+ uint32_t last_exit_reason;
+};
+
/* OSPFv3 top level data structure */
struct ospf6 {
/* The relevant vrf_id */
* to support ECMP.
*/
uint16_t max_multipath;
+
+ /*ospf6 Graceful restart helper info */
+ struct ospf6_gr_helper ospf6_helper_cfg;
+
/* Count of NSSA areas */
uint8_t anyNSSA;
struct thread *t_abr_task; /* ABR task timer. */