diff options
-rw-r--r-- | eigrpd/eigrp_const.h | 8 | ||||
-rw-r--r-- | eigrpd/eigrp_dump.c | 4 | ||||
-rw-r--r-- | eigrpd/eigrp_dump.h | 4 | ||||
-rw-r--r-- | eigrpd/eigrp_fsm.c | 38 | ||||
-rw-r--r-- | eigrpd/eigrp_interface.c | 10 | ||||
-rw-r--r-- | eigrpd/eigrp_memory.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_memory.h | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_neighbor.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_neighbor.h | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_network.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_network.h | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_siaquery.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_siareply.c | 2 | ||||
-rw-r--r-- | eigrpd/eigrp_structs.h | 4 | ||||
-rw-r--r-- | eigrpd/eigrp_topology.c | 66 | ||||
-rw-r--r-- | eigrpd/eigrp_topology.h | 12 | ||||
-rw-r--r-- | eigrpd/eigrp_update.c | 18 | ||||
-rw-r--r-- | eigrpd/eigrp_vty.c | 12 | ||||
-rw-r--r-- | eigrpd/eigrp_zebra.c | 2 |
19 files changed, 97 insertions, 97 deletions
diff --git a/eigrpd/eigrp_const.h b/eigrpd/eigrp_const.h index a008891a5..3fa59756b 100644 --- a/eigrpd/eigrp_const.h +++ b/eigrpd/eigrp_const.h @@ -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 diff --git a/eigrpd/eigrp_dump.c b/eigrpd/eigrp_dump.c index 74515c98c..57aeb2a4d 100644 --- a/eigrpd/eigrp_dump.c +++ b/eigrpd/eigrp_dump.c @@ -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; diff --git a/eigrpd/eigrp_dump.h b/eigrpd/eigrp_dump.h index 7f9381595..cda304ba6 100644 --- a/eigrpd/eigrp_dump.h +++ b/eigrpd/eigrp_dump.h @@ -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); diff --git a/eigrpd/eigrp_fsm.c b/eigrpd/eigrp_fsm.c index 47cd112cf..4514e5b9a 100644 --- a/eigrpd/eigrp_fsm.c +++ b/eigrpd/eigrp_fsm.c @@ -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 diff --git a/eigrpd/eigrp_interface.c b/eigrpd/eigrp_interface.c index ae9ec293c..f72e23ecd 100644 --- a/eigrpd/eigrp_interface.c +++ b/eigrpd/eigrp_interface.c @@ -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; diff --git a/eigrpd/eigrp_memory.c b/eigrpd/eigrp_memory.c index a8f603d2e..85b14c28c 100644 --- a/eigrpd/eigrp_memory.c +++ b/eigrpd/eigrp_memory.c @@ -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") diff --git a/eigrpd/eigrp_memory.h b/eigrpd/eigrp_memory.h index b8c85a49b..e4d02c09d 100644 --- a/eigrpd/eigrp_memory.h +++ b/eigrpd/eigrp_memory.h @@ -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 */ diff --git a/eigrpd/eigrp_neighbor.c b/eigrpd/eigrp_neighbor.c index 5d78dc375..b7b336949 100644 --- a/eigrpd/eigrp_neighbor.c +++ b/eigrpd/eigrp_neighbor.c @@ -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; diff --git a/eigrpd/eigrp_neighbor.h b/eigrpd/eigrp_neighbor.h index 6467fb24a..b939e25e5 100644 --- a/eigrpd/eigrp_neighbor.h +++ b/eigrpd/eigrp_neighbor.h @@ -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 */ diff --git a/eigrpd/eigrp_network.c b/eigrpd/eigrp_network.c index 0cf5bd9ba..c5f408031 100644 --- a/eigrpd/eigrp_network.c +++ b/eigrpd/eigrp_network.c @@ -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 diff --git a/eigrpd/eigrp_network.h b/eigrpd/eigrp_network.h index 6ddd57eee..77bd1416f 100644 --- a/eigrpd/eigrp_network.h +++ b/eigrpd/eigrp_network.h @@ -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); diff --git a/eigrpd/eigrp_siaquery.c b/eigrpd/eigrp_siaquery.c index 7264e53b6..b242bcaae 100644 --- a/eigrpd/eigrp_siaquery.c +++ b/eigrpd/eigrp_siaquery.c @@ -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; diff --git a/eigrpd/eigrp_siareply.c b/eigrpd/eigrp_siareply.c index 8496c0567..4998a2d54 100644 --- a/eigrpd/eigrp_siareply.c +++ b/eigrpd/eigrp_siareply.c @@ -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; diff --git a/eigrpd/eigrp_structs.h b/eigrpd/eigrp_structs.h index b769774a0..5bc63a7c4 100644 --- a/eigrpd/eigrp_structs.h +++ b/eigrpd/eigrp_structs.h @@ -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; diff --git a/eigrpd/eigrp_topology.c b/eigrpd/eigrp_topology.c index 64e65b694..2545f4d63 100644 --- a/eigrpd/eigrp_topology.c +++ b/eigrpd/eigrp_topology.c @@ -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 diff --git a/eigrpd/eigrp_topology.h b/eigrpd/eigrp_topology.h index 8bff08b75..ef5b32d5b 100644 --- a/eigrpd/eigrp_topology.h +++ b/eigrpd/eigrp_topology.h @@ -36,16 +36,16 @@ 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 *); diff --git a/eigrpd/eigrp_update.c b/eigrpd/eigrp_update.c index c4d315d70..fad4093ef 100644 --- a/eigrpd/eigrp_update.c +++ b/eigrpd/eigrp_update.c @@ -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; diff --git a/eigrpd/eigrp_vty.c b/eigrpd/eigrp_vty.c index 4a8842f30..f9119b56e 100644 --- a/eigrpd/eigrp_vty.c +++ b/eigrpd/eigrp_vty.c @@ -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; } diff --git a/eigrpd/eigrp_zebra.c b/eigrpd/eigrp_zebra.c index 47871dfd3..e61b3d748 100644 --- a/eigrpd/eigrp_zebra.c +++ b/eigrpd/eigrp_zebra.c @@ -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; |