]> git.puffer.fish Git - mirror/frr.git/commitdiff
eigrpd: eigrp_neighbor_entry to eigrp_nexthop_entry 1051/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 26 Aug 2017 23:32:06 +0000 (19:32 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Sat, 26 Aug 2017 23:32:06 +0000 (19:32 -0400)
The struct 'eigrp_neighbor_entry' really represents
a nexthop for a prefix.  Rename the structure to
better represent what we are representing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
19 files changed:
eigrpd/eigrp_const.h
eigrpd/eigrp_dump.c
eigrpd/eigrp_dump.h
eigrpd/eigrp_fsm.c
eigrpd/eigrp_interface.c
eigrpd/eigrp_memory.c
eigrpd/eigrp_memory.h
eigrpd/eigrp_neighbor.c
eigrpd/eigrp_neighbor.h
eigrpd/eigrp_network.c
eigrpd/eigrp_network.h
eigrpd/eigrp_siaquery.c
eigrpd/eigrp_siareply.c
eigrpd/eigrp_structs.h
eigrpd/eigrp_topology.c
eigrpd/eigrp_topology.h
eigrpd/eigrp_update.c
eigrpd/eigrp_vty.c
eigrpd/eigrp_zebra.c

index a008891a51be6cb8ff7ffc9377429ca570824a0d..3fa59756b714470bd4f7f540ed6197008e55b39e 100644 (file)
@@ -130,10 +130,10 @@ enum metric_change {
 #define EIGRP_TOPOLOGY_TYPE_REMOTE_EXTERNAL     2 // Remote external network
 
 /*EIGRP TT entry flags*/
-#define EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG     (1 << 0)
-#define EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG    (1 << 1)
-#define EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG       (1 << 2)
-#define EIGRP_NEIGHBOR_ENTRY_EXTERNAL_FLAG      (1 << 3)
+#define EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG     (1 << 0)
+#define EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG    (1 << 1)
+#define EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG       (1 << 2)
+#define EIGRP_NEXTHOP_ENTRY_EXTERNAL_FLAG      (1 << 3)
 
 /*EIGRP FSM state count, event count*/
 #define EIGRP_FSM_STATE_MAX                  5
index 74515c98cb6a23d3556a0b30bdc71e627bcb1fb3..57aeb2a4d1d159f52f810fcaf0bf2604eec3c2d5 100644 (file)
@@ -302,8 +302,8 @@ void show_ip_eigrp_prefix_entry(struct vty *vty, struct eigrp_prefix_entry *tn)
        list_delete(successors);
 }
 
-void show_ip_eigrp_neighbor_entry(struct vty *vty, struct eigrp *eigrp,
-                                 struct eigrp_neighbor_entry *te, int *first)
+void show_ip_eigrp_nexthop_entry(struct vty *vty, struct eigrp *eigrp,
+                                 struct eigrp_nexthop_entry *te, int *first)
 {
        if (te->reported_distance == EIGRP_MAX_METRIC)
                return;
index 7f9381595a12cc49b847e8178ae36d481df5ba1b..cda304ba6d18e4dc0751df0d0f3aed62f4df0ef2 100644 (file)
@@ -156,8 +156,8 @@ extern void show_ip_eigrp_neighbor_sub(struct vty *, struct eigrp_neighbor *,
                                       int);
 extern void show_ip_eigrp_prefix_entry(struct vty *,
                                       struct eigrp_prefix_entry *);
-extern void show_ip_eigrp_neighbor_entry(struct vty *, struct eigrp *,
-                                        struct eigrp_neighbor_entry *, int *);
+extern void show_ip_eigrp_nexthop_entry(struct vty *, struct eigrp *,
+                                        struct eigrp_nexthop_entry *, int *);
 
 extern void eigrp_debug_init(void);
 
index 47cd112cf5da88fae402514d34fa6f45137eb09e..4514e5b9a8e26b45a905f8380fc6df96312afdb0 100644 (file)
@@ -183,12 +183,12 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
        // Loading base information from message
        // struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *entry = msg->entry;
+       struct eigrp_nexthop_entry *entry = msg->entry;
        u_char actual_state = prefix->state;
        enum metric_change change;
 
        if (entry == NULL) {
-               entry = eigrp_neighbor_entry_new();
+               entry = eigrp_nexthop_entry_new();
                entry->adv_router = msg->adv_router;
                entry->ei = msg->adv_router->ei;
                entry->prefix = prefix;
@@ -203,7 +203,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
 
        switch (actual_state) {
        case EIGRP_FSM_STATE_PASSIVE: {
-               struct eigrp_neighbor_entry *head =
+               struct eigrp_nexthop_entry *head =
                        listnode_head(prefix->entries);
 
                if (head->reported_distance < prefix->fdistance) {
@@ -224,7 +224,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
        }
        case EIGRP_FSM_STATE_ACTIVE_0: {
                if (msg->packet_type == EIGRP_OPC_REPLY) {
-                       struct eigrp_neighbor_entry *head =
+                       struct eigrp_nexthop_entry *head =
                                listnode_head(prefix->entries);
 
                        listnode_delete(prefix->rij, entry->adv_router);
@@ -240,7 +240,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
                        return EIGRP_FSM_EVENT_LR_FCN;
                } else if (msg->packet_type == EIGRP_OPC_QUERY
                           && (entry->flags
-                              & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                              & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                        return EIGRP_FSM_EVENT_QACT;
                }
 
@@ -250,14 +250,14 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
        }
        case EIGRP_FSM_STATE_ACTIVE_1: {
                if (msg->packet_type == EIGRP_OPC_QUERY
-                   && (entry->flags & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                   && (entry->flags & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                        return EIGRP_FSM_EVENT_QACT;
                } else if (msg->packet_type == EIGRP_OPC_REPLY) {
                        listnode_delete(prefix->rij, entry->adv_router);
 
                        if (change == METRIC_INCREASE
                            && (entry->flags
-                               & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                               & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                                return EIGRP_FSM_EVENT_DINC;
                        } else if (prefix->rij->count) {
                                return EIGRP_FSM_KEEP_STATE;
@@ -267,7 +267,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
                        }
                } else if (msg->packet_type == EIGRP_OPC_UPDATE && change == 1
                           && (entry->flags
-                              & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                              & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                        return EIGRP_FSM_EVENT_DINC;
                }
                return EIGRP_FSM_KEEP_STATE;
@@ -276,7 +276,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
        }
        case EIGRP_FSM_STATE_ACTIVE_2: {
                if (msg->packet_type == EIGRP_OPC_REPLY) {
-                       struct eigrp_neighbor_entry *head =
+                       struct eigrp_nexthop_entry *head =
                                listnode_head(prefix->entries);
 
                        listnode_delete(prefix->rij, entry->adv_router);
@@ -302,7 +302,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
 
                        if (change == METRIC_INCREASE
                            && (entry->flags
-                               & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                               & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                                return EIGRP_FSM_EVENT_DINC;
                        } else if (prefix->rij->count) {
                                return EIGRP_FSM_KEEP_STATE;
@@ -312,7 +312,7 @@ static int eigrp_get_fsm_event(struct eigrp_fsm_action_message *msg)
                        }
                } else if (msg->packet_type == EIGRP_OPC_UPDATE && change == 1
                           && (entry->flags
-                              & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)) {
+                              & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)) {
                        return EIGRP_FSM_EVENT_DINC;
                }
                return EIGRP_FSM_KEEP_STATE;
@@ -348,7 +348,7 @@ int eigrp_fsm_event_nq_fcn(struct eigrp_fsm_action_message *msg)
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
        struct list *successors = eigrp_topology_get_successor(prefix);
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
 
        assert(successors); // If this is NULL we have shit the bed, fun huh?
 
@@ -376,7 +376,7 @@ int eigrp_fsm_event_q_fcn(struct eigrp_fsm_action_message *msg)
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
        struct list *successors = eigrp_topology_get_successor(prefix);
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
 
        assert(successors); // If this is NULL somebody poked us in the eye.
 
@@ -401,7 +401,7 @@ int eigrp_fsm_event_q_fcn(struct eigrp_fsm_action_message *msg)
 int eigrp_fsm_event_keep_state(struct eigrp_fsm_action_message *msg)
 {
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *ne = listnode_head(prefix->entries);
+       struct eigrp_nexthop_entry *ne = listnode_head(prefix->entries);
 
        if (prefix->state == EIGRP_FSM_STATE_PASSIVE) {
                if (!eigrp_metrics_is_same(prefix->reported_metric,
@@ -431,7 +431,7 @@ int eigrp_fsm_event_lr(struct eigrp_fsm_action_message *msg)
 {
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *ne = listnode_head(prefix->entries);
+       struct eigrp_nexthop_entry *ne = listnode_head(prefix->entries);
 
        prefix->fdistance = prefix->distance = prefix->rdistance =
                ne->distance;
@@ -461,7 +461,7 @@ int eigrp_fsm_event_lr(struct eigrp_fsm_action_message *msg)
 int eigrp_fsm_event_dinc(struct eigrp_fsm_action_message *msg)
 {
        struct list *successors = eigrp_topology_get_successor(msg->prefix);
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
 
        assert(successors); // Trump and his big hands
 
@@ -483,7 +483,7 @@ int eigrp_fsm_event_lr_fcs(struct eigrp_fsm_action_message *msg)
 {
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *ne = listnode_head(prefix->entries);
+       struct eigrp_nexthop_entry *ne = listnode_head(prefix->entries);
 
        prefix->state = EIGRP_FSM_STATE_PASSIVE;
        prefix->distance = prefix->rdistance = ne->distance;
@@ -515,7 +515,7 @@ int eigrp_fsm_event_lr_fcn(struct eigrp_fsm_action_message *msg)
 {
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *best_successor;
+       struct eigrp_nexthop_entry *best_successor;
        struct list *successors = eigrp_topology_get_successor(prefix);
 
        assert(successors); // Routing without a stack
@@ -544,7 +544,7 @@ int eigrp_fsm_event_lr_fcn(struct eigrp_fsm_action_message *msg)
 int eigrp_fsm_event_qact(struct eigrp_fsm_action_message *msg)
 {
        struct list *successors = eigrp_topology_get_successor(msg->prefix);
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
 
        assert(successors); // Cats and no Dogs
 
index ae9ec293ceda94d9cea91d4e24ece35cd4040b05..f72e23ecd7af10aacdcaeaa34d982c84491d5c52 100644 (file)
@@ -245,7 +245,7 @@ struct eigrp_if_params *eigrp_lookup_if_params(struct interface *ifp,
 int eigrp_if_up(struct eigrp_interface *ei)
 {
        struct eigrp_prefix_entry *pe;
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
        struct eigrp_metrics metric;
        struct eigrp_interface *ei2;
        struct listnode *node, *nnode;
@@ -280,14 +280,14 @@ int eigrp_if_up(struct eigrp_interface *ei)
 
        /*Add connected entry to topology table*/
 
-       ne = eigrp_neighbor_entry_new();
+       ne = eigrp_nexthop_entry_new();
        ne->ei = ei;
        ne->reported_metric = metric;
        ne->total_metric = metric;
        ne->distance = eigrp_calculate_metrics(eigrp, metric);
        ne->reported_distance = 0;
        ne->adv_router = eigrp->neighbor_self;
-       ne->flags = EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;
+       ne->flags = EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
 
        struct prefix dest_addr;
 
@@ -313,7 +313,7 @@ int eigrp_if_up(struct eigrp_interface *ei)
                eigrp_prefix_entry_add(eigrp->topology_table, pe);
                listnode_add(eigrp->topology_changes_internalIPV4, pe);
 
-               eigrp_neighbor_entry_add(pe, ne);
+               eigrp_nexthop_entry_add(pe, ne);
 
                for (ALL_LIST_ELEMENTS(eigrp->eiflist, node, nnode, ei2)) {
                        eigrp_update_send(ei2);
@@ -325,7 +325,7 @@ int eigrp_if_up(struct eigrp_interface *ei)
                struct eigrp_fsm_action_message msg;
 
                ne->prefix = pe;
-               eigrp_neighbor_entry_add(pe, ne);
+               eigrp_nexthop_entry_add(pe, ne);
 
                msg.packet_type = EIGRP_OPC_UPDATE;
                msg.eigrp = eigrp;
index a8f603d2e552d7f36c25a5a326a87c952c5192c7..85b14c28cec402b7a4c465f07362dfa1b5985940 100644 (file)
@@ -38,5 +38,5 @@ DEFINE_MTYPE(EIGRPD, EIGRP_SEQ_TLV, "EIGRP SEQ TLV")
 DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_TLV, "EIGRP AUTH TLV")
 DEFINE_MTYPE(EIGRPD, EIGRP_AUTH_SHA256_TLV, "EIGRP SHA TLV")
 DEFINE_MTYPE(EIGRPD, EIGRP_PREFIX_ENTRY, "EIGRP Prefix")
-DEFINE_MTYPE(EIGRPD, EIGRP_NEIGHBOR_ENTRY, "EIGRP Neighbor Entry")
+DEFINE_MTYPE(EIGRPD, EIGRP_NEXTHOP_ENTRY, "EIGRP Nexthop Entry")
 DEFINE_MTYPE(EIGRPD, EIGRP_FSM_MSG, "EIGRP FSM Message")
index b8c85a49b08c1c234fe512ac8507b91c9225c11e..e4d02c09d490926d7e16420e54ca6764c97aa51c 100644 (file)
@@ -37,7 +37,7 @@ DECLARE_MTYPE(EIGRP_SEQ_TLV)
 DECLARE_MTYPE(EIGRP_AUTH_TLV)
 DECLARE_MTYPE(EIGRP_AUTH_SHA256_TLV)
 DECLARE_MTYPE(EIGRP_PREFIX_ENTRY)
-DECLARE_MTYPE(EIGRP_NEIGHBOR_ENTRY)
+DECLARE_MTYPE(EIGRP_NEXTHOP_ENTRY)
 DECLARE_MTYPE(EIGRP_FSM_MSG)
 
 #endif /* _FRR_EIGRP_MEMORY_H */
index 5d78dc375c68fb6a13346e80f153e8f509c0100e..b7b336949ea9e753b2b73fdf9d198b58a9af5f1c 100644 (file)
@@ -358,7 +358,7 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
        eigrp_nbr_delete(nbr);
 }
 
-int eigrp_nbr_split_horizon_check(struct eigrp_neighbor_entry *ne, struct eigrp_interface *ei)
+int eigrp_nbr_split_horizon_check(struct eigrp_nexthop_entry *ne, struct eigrp_interface *ei)
 {
        if (ne->distance == EIGRP_MAX_METRIC)
                return 0;
index 6467fb24a90cbdf77a6dad53061e6ca9b101eadd..b939e25e5e9554d485de0c2494899f95043c0812 100644 (file)
@@ -53,6 +53,6 @@ extern struct eigrp_neighbor *eigrp_nbr_lookup_by_addr_process(struct eigrp *,
                                                               struct in_addr);
 extern void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty);
 
-extern int eigrp_nbr_split_horizon_check(struct eigrp_neighbor_entry *ne,
+extern int eigrp_nbr_split_horizon_check(struct eigrp_nexthop_entry *ne,
                                         struct eigrp_interface *ei);
 #endif /* _ZEBRA_EIGRP_NEIGHBOR_H */
index 0cf5bd9bad241cbb9ecf93400bad648ef79450d4..c5f4080317ec775001818b155015f838628d9d99 100644 (file)
@@ -413,7 +413,7 @@ u_int32_t eigrp_calculate_metrics(struct eigrp *eigrp,
 }
 
 u_int32_t eigrp_calculate_total_metrics(struct eigrp *eigrp,
-                                       struct eigrp_neighbor_entry *entry)
+                                       struct eigrp_nexthop_entry *entry)
 {
        entry->total_metric = entry->reported_metric;
        uint64_t temp_delay = (uint64_t)entry->total_metric.delay
index 6ddd57eee5596df5e3aca66b9daab53cdfaabde3..77bd1416fcf6efa022034484ef923e158903ec6f 100644 (file)
@@ -45,7 +45,7 @@ extern void eigrp_adjust_sndbuflen(struct eigrp *, unsigned int);
 
 extern u_int32_t eigrp_calculate_metrics(struct eigrp *, struct eigrp_metrics);
 extern u_int32_t eigrp_calculate_total_metrics(struct eigrp *,
-                                              struct eigrp_neighbor_entry *);
+                                              struct eigrp_nexthop_entry *);
 extern u_char eigrp_metrics_is_same(struct eigrp_metrics, struct eigrp_metrics);
 extern void eigrp_external_routes_refresh(struct eigrp *, int);
 
index 7264e53b6b139e93efbb393ca5b2fdae47724d9f..b242bcaae9b7352b6ee2a74b9412b8c671c23c95 100644 (file)
@@ -95,7 +95,7 @@ void eigrp_siaquery_receive(struct eigrp *eigrp, struct ip *iph,
                         * know)*/
                        if (dest != NULL) {
                                struct eigrp_fsm_action_message msg;
-                               struct eigrp_neighbor_entry *entry =
+                               struct eigrp_nexthop_entry *entry =
                                        eigrp_prefix_entry_lookup(dest->entries,
                                                                  nbr);
                                msg.packet_type = EIGRP_OPC_SIAQUERY;
index 8496c05675316f834af7075e8526f07a715aa976..4998a2d54b4222641233661ebc5f16a5173e8f1e 100644 (file)
@@ -94,7 +94,7 @@ void eigrp_siareply_receive(struct eigrp *eigrp, struct ip *iph,
                         * know)*/
                        if (dest != NULL) {
                                struct eigrp_fsm_action_message msg;
-                               struct eigrp_neighbor_entry *entry =
+                               struct eigrp_nexthop_entry *entry =
                                        eigrp_prefix_entry_lookup(dest->entries,
                                                                  nbr);
                                msg.packet_type = EIGRP_OPC_SIAQUERY;
index b769774a032810ef7d23d23d43d9c8edff2f3ad6..5bc63a7c47740170024e7ea8fda01b2b0b0a1a6d 100644 (file)
@@ -480,7 +480,7 @@ struct eigrp_prefix_entry {
 };
 
 /* EIGRP Topology table record structure */
-struct eigrp_neighbor_entry {
+struct eigrp_nexthop_entry {
        struct eigrp_prefix_entry *prefix;
        u_int32_t reported_distance; // distance reported by neighbor
        u_int32_t distance; // sum of reported distance and link cost to
@@ -508,7 +508,7 @@ struct eigrp_fsm_action_message {
        u_char packet_type;                // UPDATE, QUERY, SIAQUERY, SIAREPLY
        struct eigrp *eigrp;               // which thread sent mesg
        struct eigrp_neighbor *adv_router; // advertising neighbor
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
        struct eigrp_prefix_entry *prefix;
        msg_data_t data_type; // internal or external tlv type
        struct eigrp_metrics metrics;
index 64e65b694cce8838dfd44de393cb22051b6c4fa3..2545f4d63f165b1cb3da7d1576e5da3cf75a8a60 100644 (file)
@@ -54,8 +54,8 @@
 static int eigrp_prefix_entry_cmp(struct eigrp_prefix_entry *,
                                  struct eigrp_prefix_entry *);
 static void eigrp_prefix_entry_del(struct eigrp_prefix_entry *);
-static int eigrp_neighbor_entry_cmp(struct eigrp_neighbor_entry *,
-                                   struct eigrp_neighbor_entry *);
+static int eigrp_nexthop_entry_cmp(struct eigrp_nexthop_entry *,
+                                   struct eigrp_nexthop_entry *);
 
 /*
  * Returns linkedlist used as topology table
@@ -116,7 +116,7 @@ struct eigrp_prefix_entry *eigrp_prefix_entry_new()
                      sizeof(struct eigrp_prefix_entry));
        new->entries = list_new();
        new->rij = list_new();
-       new->entries->cmp = (int (*)(void *, void *))eigrp_neighbor_entry_cmp;
+       new->entries->cmp = (int (*)(void *, void *))eigrp_nexthop_entry_cmp;
        new->distance = new->fdistance = new->rdistance = EIGRP_MAX_METRIC;
        new->destination = NULL;
 
@@ -126,8 +126,8 @@ struct eigrp_prefix_entry *eigrp_prefix_entry_new()
 /*
  * Topology entry comparison
  */
-static int eigrp_neighbor_entry_cmp(struct eigrp_neighbor_entry *entry1,
-                                   struct eigrp_neighbor_entry *entry2)
+static int eigrp_nexthop_entry_cmp(struct eigrp_nexthop_entry *entry1,
+                                   struct eigrp_nexthop_entry *entry2)
 {
        if (entry1->distance < entry2->distance)
                return -1;
@@ -141,12 +141,12 @@ static int eigrp_neighbor_entry_cmp(struct eigrp_neighbor_entry *entry1,
  * Returns new topology entry
  */
 
-struct eigrp_neighbor_entry *eigrp_neighbor_entry_new()
+struct eigrp_nexthop_entry *eigrp_nexthop_entry_new()
 {
-       struct eigrp_neighbor_entry *new;
+       struct eigrp_nexthop_entry *new;
 
-       new = XCALLOC(MTYPE_EIGRP_NEIGHBOR_ENTRY,
-                     sizeof(struct eigrp_neighbor_entry));
+       new = XCALLOC(MTYPE_EIGRP_NEXTHOP_ENTRY,
+                     sizeof(struct eigrp_nexthop_entry));
        new->reported_distance = EIGRP_MAX_METRIC;
        new->distance = EIGRP_MAX_METRIC;
 
@@ -185,8 +185,8 @@ void eigrp_prefix_entry_add(struct list *topology,
 /*
  * Adding topology entry to topology node
  */
-void eigrp_neighbor_entry_add(struct eigrp_prefix_entry *node,
-                             struct eigrp_neighbor_entry *entry)
+void eigrp_nexthop_entry_add(struct eigrp_prefix_entry *node,
+                             struct eigrp_nexthop_entry *entry)
 {
        struct list *l = list_new();
 
@@ -229,13 +229,13 @@ void eigrp_prefix_entry_delete(struct list *topology,
 /*
  * Deleting topology entry from topology node
  */
-void eigrp_neighbor_entry_delete(struct eigrp_prefix_entry *node,
-                                struct eigrp_neighbor_entry *entry)
+void eigrp_nexthop_entry_delete(struct eigrp_prefix_entry *node,
+                                struct eigrp_nexthop_entry *entry)
 {
        if (listnode_lookup(node->entries, entry) != NULL) {
                listnode_delete(node->entries, entry);
                eigrp_zebra_route_delete(node->destination);
-               XFREE(MTYPE_EIGRP_NEIGHBOR_ENTRY, entry);
+               XFREE(MTYPE_EIGRP_NEXTHOP_ENTRY, entry);
        }
 }
 
@@ -283,11 +283,11 @@ eigrp_topology_table_lookup_ipv4(struct list *topology_table,
 struct list *eigrp_topology_get_successor(struct eigrp_prefix_entry *table_node)
 {
        struct list *successors = list_new();
-       struct eigrp_neighbor_entry *data;
+       struct eigrp_nexthop_entry *data;
        struct listnode *node1, *node2;
 
        for (ALL_LIST_ELEMENTS(table_node->entries, node1, node2, data)) {
-               if (data->flags & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG) {
+               if (data->flags & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG) {
                        listnode_add(successors, data);
                }
        }
@@ -321,10 +321,10 @@ eigrp_topology_get_successor_max(struct eigrp_prefix_entry *table_node,
        return successors;
 }
 
-struct eigrp_neighbor_entry *
+struct eigrp_nexthop_entry *
 eigrp_prefix_entry_lookup(struct list *entries, struct eigrp_neighbor *nbr)
 {
-       struct eigrp_neighbor_entry *data;
+       struct eigrp_nexthop_entry *data;
        struct listnode *node, *nnode;
        for (ALL_LIST_ELEMENTS(entries, node, nnode, data)) {
                if (data->adv_router == nbr) {
@@ -341,7 +341,7 @@ struct list *eigrp_neighbor_prefixes_lookup(struct eigrp *eigrp,
 {
        struct listnode *node1, *node11, *node2, *node22;
        struct eigrp_prefix_entry *prefix;
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
 
        /* create new empty list for prefixes storage */
        struct list *prefixes = list_new();
@@ -365,7 +365,7 @@ enum metric_change eigrp_topology_update_distance(struct eigrp_fsm_action_messag
 {
        struct eigrp *eigrp = msg->eigrp;
        struct eigrp_prefix_entry *prefix = msg->prefix;
-       struct eigrp_neighbor_entry *entry = msg->entry;
+       struct eigrp_nexthop_entry *entry = msg->entry;
        enum metric_change change = METRIC_SAME;
        u_int32_t new_reported_distance;
 
@@ -439,7 +439,7 @@ void eigrp_topology_update_all_node_flags(struct eigrp *eigrp)
 void eigrp_topology_update_node_flags(struct eigrp_prefix_entry *dest)
 {
        struct listnode *node;
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
        struct eigrp *eigrp = eigrp_lookup();
 
        for (ALL_LIST_ELEMENTS_RO(dest->entries, node, entry)) {
@@ -447,16 +447,16 @@ void eigrp_topology_update_node_flags(struct eigrp_prefix_entry *dest)
                     <= (uint64_t)(dest->distance * eigrp->variance))
                    && entry->distance != EIGRP_MAX_METRIC) // is successor
                {
-                       entry->flags |= EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;
-                       entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG;
+                       entry->flags |= EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
+                       entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
                } else if (entry->reported_distance
                           < dest->fdistance) // is feasible successor
                {
-                       entry->flags |= EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG;
-                       entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;
+                       entry->flags |= EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
+                       entry->flags &= ~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
                } else {
-                       entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG;
-                       entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;
+                       entry->flags &= ~EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG;
+                       entry->flags &= ~EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
                }
        }
 }
@@ -467,19 +467,19 @@ void eigrp_update_routing_table(struct eigrp_prefix_entry *prefix)
        struct list *successors =
                eigrp_topology_get_successor_max(prefix, eigrp->max_paths);
        struct listnode *node;
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
 
        if (successors) {
                eigrp_zebra_route_add(prefix->destination,
                                      successors);
                for (ALL_LIST_ELEMENTS_RO(successors, node, entry))
-                       entry->flags |= EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG;
+                       entry->flags |= EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG;
 
                list_delete(successors);
        } else {
                eigrp_zebra_route_delete(prefix->destination);
                for (ALL_LIST_ELEMENTS_RO(prefix->entries, node, entry))
-                       entry->flags &= ~EIGRP_NEIGHBOR_ENTRY_INTABLE_FLAG;
+                       entry->flags &= ~EIGRP_NEXTHOP_ENTRY_INTABLE_FLAG;
        }
 }
 
@@ -488,7 +488,7 @@ void eigrp_topology_neighbor_down(struct eigrp *eigrp,
 {
        struct listnode *node1, *node11, *node2, *node22;
        struct eigrp_prefix_entry *prefix;
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
 
        for (ALL_LIST_ELEMENTS(eigrp->topology_table, node1, node11, prefix)) {
                for (ALL_LIST_ELEMENTS(prefix->entries, node2, node22, entry)) {
@@ -517,10 +517,10 @@ void eigrp_update_topology_table_prefix(struct list *table,
 {
        struct listnode *node1, *node2;
 
-       struct eigrp_neighbor_entry *entry;
+       struct eigrp_nexthop_entry *entry;
        for (ALL_LIST_ELEMENTS(prefix->entries, node1, node2, entry)) {
                if (entry->distance == EIGRP_MAX_METRIC) {
-                       eigrp_neighbor_entry_delete(prefix, entry);
+                       eigrp_nexthop_entry_delete(prefix, entry);
                }
        }
        if (prefix->distance == EIGRP_MAX_METRIC
index 8bff08b75a84857a69bf679e874b758f1c9b79ed..ef5b32d5bf491035de2c8469b266b572c398fe6b 100644 (file)
 extern struct list *eigrp_topology_new(void);
 extern void eigrp_topology_init(struct list *);
 extern struct eigrp_prefix_entry *eigrp_prefix_entry_new(void);
-extern struct eigrp_neighbor_entry *eigrp_neighbor_entry_new(void);
+extern struct eigrp_nexthop_entry *eigrp_nexthop_entry_new(void);
 extern void eigrp_topology_free(struct list *);
 extern void eigrp_topology_cleanup(struct list *);
 extern void eigrp_prefix_entry_add(struct list *, struct eigrp_prefix_entry *);
-extern void eigrp_neighbor_entry_add(struct eigrp_prefix_entry *,
-                                    struct eigrp_neighbor_entry *);
+extern void eigrp_nexthop_entry_add(struct eigrp_prefix_entry *,
+                                    struct eigrp_nexthop_entry *);
 extern void eigrp_prefix_entry_delete(struct list *,
                                      struct eigrp_prefix_entry *);
-extern void eigrp_neighbor_entry_delete(struct eigrp_prefix_entry *,
-                                       struct eigrp_neighbor_entry *);
+extern void eigrp_nexthop_entry_delete(struct eigrp_prefix_entry *,
+                                       struct eigrp_nexthop_entry *);
 extern void eigrp_topology_delete_all(struct list *);
 extern unsigned int eigrp_topology_table_isempty(struct list *);
 extern struct eigrp_prefix_entry *
@@ -54,7 +54,7 @@ extern struct list *eigrp_topology_get_successor(struct eigrp_prefix_entry *);
 extern struct list *
 eigrp_topology_get_successor_max(struct eigrp_prefix_entry *pe,
                                 unsigned int maxpaths);
-extern struct eigrp_neighbor_entry *
+extern struct eigrp_nexthop_entry *
 eigrp_prefix_entry_lookup(struct list *, struct eigrp_neighbor *);
 extern struct list *eigrp_neighbor_prefixes_lookup(struct eigrp *,
                                                   struct eigrp_neighbor *);
index c4d315d70df24d2c0e5fff5ad64146e12c21b6ca..fad4093ef442c8df3082cfd5f64c79ccac1c4735 100644 (file)
@@ -151,7 +151,7 @@ static void eigrp_update_receive_GR_ask(struct eigrp *eigrp,
                /* set delay to MAX */
                fsm_msg.metrics.delay = EIGRP_MAX_METRIC;
 
-               struct eigrp_neighbor_entry *entry =
+               struct eigrp_nexthop_entry *entry =
                        eigrp_prefix_entry_lookup(prefix->entries, nbr);
 
                fsm_msg.packet_type = EIGRP_OPC_UPDATE;
@@ -176,7 +176,7 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
        struct eigrp_neighbor *nbr;
        struct TLV_IPv4_Internal_type *tlv;
        struct eigrp_prefix_entry *pe;
-       struct eigrp_neighbor_entry *ne;
+       struct eigrp_nexthop_entry *ne;
        u_int32_t flags;
        u_int16_t type;
        u_int16_t length;
@@ -319,7 +319,7 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
                                                                  dest);
 
                                struct eigrp_fsm_action_message msg;
-                               struct eigrp_neighbor_entry *entry =
+                               struct eigrp_nexthop_entry *entry =
                                        eigrp_prefix_entry_lookup(dest->entries,
                                                                  nbr);
 
@@ -342,7 +342,7 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
                                pe->state = EIGRP_FSM_STATE_PASSIVE;
                                pe->nt = EIGRP_TOPOLOGY_TYPE_REMOTE;
 
-                               ne = eigrp_neighbor_entry_new();
+                               ne = eigrp_nexthop_entry_new();
                                ne->ei = ei;
                                ne->adv_router = nbr;
                                ne->reported_metric = tlv->metric;
@@ -362,11 +362,11 @@ void eigrp_update_receive(struct eigrp *eigrp, struct ip *iph,
                                pe->fdistance = pe->distance = pe->rdistance =
                                        ne->distance;
                                ne->prefix = pe;
-                               ne->flags = EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG;
+                               ne->flags = EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG;
 
                                eigrp_prefix_entry_add(eigrp->topology_table,
                                                       pe);
-                               eigrp_neighbor_entry_add(pe, ne);
+                               eigrp_nexthop_entry_add(pe, ne);
                                pe->distance = pe->fdistance = pe->rdistance =
                                        ne->distance;
                                pe->reported_metric = ne->total_metric;
@@ -525,7 +525,7 @@ void eigrp_update_send_EOT(struct eigrp_neighbor *nbr)
 {
        struct eigrp_packet *ep;
        u_int16_t length = EIGRP_HEADER_LEN;
-       struct eigrp_neighbor_entry *te;
+       struct eigrp_nexthop_entry *te;
        struct eigrp_prefix_entry *pe;
        struct listnode *node, *node2, *nnode, *nnode2;
        struct eigrp_interface *ei = nbr->ei;
@@ -615,7 +615,7 @@ void eigrp_update_send(struct eigrp_interface *ei)
        has_tlv = 0;
        for (ALL_LIST_ELEMENTS(ei->eigrp->topology_changes_internalIPV4, node,
                               nnode, pe)) {
-               struct eigrp_neighbor_entry *ne;
+               struct eigrp_nexthop_entry *ne;
 
                if (!(pe->req_action & EIGRP_FSM_NEED_UPDATE))
                        continue;
@@ -824,7 +824,7 @@ static void eigrp_update_send_GR_part(struct eigrp_neighbor *nbr)
                        /* prepare message for FSM */
                        struct eigrp_fsm_action_message fsm_msg;
 
-                       struct eigrp_neighbor_entry *entry =
+                       struct eigrp_nexthop_entry *entry =
                                eigrp_prefix_entry_lookup(pe->entries, nbr);
 
                        fsm_msg.packet_type = EIGRP_OPC_UPDATE;
index 4a8842f30e9c65dd8fb7101b3768cbd152e6b736..f9119b56eed90574603417d1041efa9154fbb3cb 100644 (file)
@@ -464,7 +464,7 @@ DEFUN (show_ip_eigrp_topology,
        struct eigrp *eigrp;
        struct listnode *node, *node2;
        struct eigrp_prefix_entry *tn;
-       struct eigrp_neighbor_entry *te;
+       struct eigrp_nexthop_entry *te;
        int first;
 
        eigrp = eigrp_lookup();
@@ -480,12 +480,12 @@ DEFUN (show_ip_eigrp_topology,
                for (ALL_LIST_ELEMENTS_RO(tn->entries, node2, te)) {
                        if (argc == 5
                            || (((te->flags
-                                 & EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)
-                                == EIGRP_NEIGHBOR_ENTRY_SUCCESSOR_FLAG)
+                                 & EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)
+                                == EIGRP_NEXTHOP_ENTRY_SUCCESSOR_FLAG)
                                || ((te->flags
-                                    & EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG)
-                                   == EIGRP_NEIGHBOR_ENTRY_FSUCCESSOR_FLAG))) {
-                               show_ip_eigrp_neighbor_entry(vty, eigrp, te,
+                                    & EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG)
+                                   == EIGRP_NEXTHOP_ENTRY_FSUCCESSOR_FLAG))) {
+                               show_ip_eigrp_nexthop_entry(vty, eigrp, te,
                                                             &first);
                                first = 0;
                        }
index 47871dfd3e381484c8ca611e41cf85d31b4dc065..e61b3d748c228bb49185e27bbe3a88a63cdf3c2d 100644 (file)
@@ -365,7 +365,7 @@ void eigrp_zebra_route_add(struct prefix *p, struct list *successors)
 {
        struct zapi_route api;
        struct zapi_nexthop *api_nh;
-       struct eigrp_neighbor_entry *te;
+       struct eigrp_nexthop_entry *te;
        struct listnode *node;
        int count = 0;