summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_neighbor.h
diff options
context:
space:
mode:
Diffstat (limited to 'ospf6d/ospf6_neighbor.h')
-rw-r--r--ospf6d/ospf6_neighbor.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/ospf6d/ospf6_neighbor.h b/ospf6d/ospf6_neighbor.h
index f8bab6dc9..c6d81006e 100644
--- a/ospf6d/ospf6_neighbor.h
+++ b/ospf6d/ospf6_neighbor.h
@@ -6,8 +6,11 @@
#ifndef OSPF6_NEIGHBOR_H
#define OSPF6_NEIGHBOR_H
+#include "typesafe.h"
#include "hook.h"
+#include "ospf6_message.h"
+
/* Forward declaration(s). */
struct ospf6_area;
@@ -52,6 +55,8 @@ struct ospf6_helper_info {
uint32_t rejected_reason;
};
+struct ospf6_if_p2xp_neighcfg;
+
/* Neighbor structure */
struct ospf6_neighbor {
/* Neighbor Router ID String */
@@ -60,6 +65,11 @@ struct ospf6_neighbor {
/* OSPFv3 Interface this neighbor belongs to */
struct ospf6_interface *ospf6_if;
+ /* P2P/P2MP config for this neighbor.
+ * can be NULL if not explicitly configured!
+ */
+ struct ospf6_if_p2xp_neighcfg *p2xp_cfg;
+
/* Neighbor state */
uint8_t state;
@@ -140,6 +150,22 @@ struct ospf6_neighbor {
bool lls_present;
};
+PREDECL_RBTREE_UNIQ(ospf6_if_p2xp_neighcfgs);
+
+struct ospf6_if_p2xp_neighcfg {
+ struct ospf6_if_p2xp_neighcfgs_item item;
+
+ struct ospf6_interface *ospf6_if;
+ struct in6_addr addr;
+
+ bool cfg_cost : 1;
+
+ uint32_t cost;
+
+ /* NULL if down */
+ struct ospf6_neighbor *active;
+};
+
/* Neighbor state */
#define OSPF6_NEIGHBOR_DOWN 1
#define OSPF6_NEIGHBOR_ATTEMPT 2
@@ -193,6 +219,8 @@ void ospf6_neighbor_delete(struct ospf6_neighbor *on);
void ospf6_neighbor_lladdr_set(struct ospf6_neighbor *on,
const struct in6_addr *addr);
+uint32_t ospf6_neighbor_cost(struct ospf6_neighbor *on);
+
/* Neighbor event */
extern void hello_received(struct event *thread);
extern void twoway_received(struct event *thread);
@@ -208,6 +236,8 @@ extern void ospf6_check_nbr_loading(struct ospf6_neighbor *on);
extern void ospf6_neighbor_init(void);
extern int config_write_ospf6_debug_neighbor(struct vty *vty);
+extern int config_write_ospf6_p2xp_neighbor(struct vty *vty,
+ struct ospf6_interface *oi);
extern void install_element_ospf6_debug_neighbor(void);
DECLARE_HOOK(ospf6_neighbor_change,