From 52dc7ee65f8d887b0730abc0a5d44d27fc6ecafd Mon Sep 17 00:00:00 2001 From: hasso Date: Thu, 23 Sep 2004 19:18:23 +0000 Subject: Remove usage of evil list and listnode typedefs. --- ospfd/ChangeLog | 4 ++++ ospfd/ospf_abr.c | 32 +++++++++++++++--------------- ospfd/ospf_ase.c | 32 +++++++++++++++--------------- ospfd/ospf_flood.c | 12 ++++++------ ospfd/ospf_ia.c | 10 +++++----- ospfd/ospf_interface.c | 34 ++++++++++++++++---------------- ospfd/ospf_interface.h | 14 ++++++------- ospfd/ospf_ism.c | 20 +++++++++---------- ospfd/ospf_lsa.c | 40 ++++++++++++++++++------------------- ospfd/ospf_neighbor.c | 4 ++-- ospfd/ospf_packet.c | 47 ++++++++++++++++++++++---------------------- ospfd/ospf_packet.h | 2 +- ospfd/ospf_route.c | 28 +++++++++++++------------- ospfd/ospf_route.h | 8 ++++---- ospfd/ospf_spf.c | 53 +++++++++++++++++++++++++------------------------- ospfd/ospf_spf.h | 4 ++-- ospfd/ospf_vty.c | 48 ++++++++++++++++++++++----------------------- ospfd/ospf_zebra.c | 8 ++++---- ospfd/ospfd.c | 34 ++++++++++++++++---------------- ospfd/ospfd.h | 20 +++++++++---------- 20 files changed, 230 insertions(+), 224 deletions(-) (limited to 'ospfd') diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index 461519f8..3a0b1342 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,7 @@ +2004-09-23 Hasso Tepper + + * *.[c|h]: list -> struct list *, listnode -> struct listnode *. + 2004-09-12 Paul Jakma * ospf_packet.c: Fix bugzilla #107 diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c index 21bd6738..9f3a587c 100644 --- a/ospfd/ospf_abr.c +++ b/ospfd/ospf_abr.c @@ -174,7 +174,7 @@ struct ospf_area_range * ospf_area_range_match_any (struct ospf *ospf, struct prefix_ipv4 *p) { struct ospf_area_range *range; - listnode node; + struct listnode *node; for (node = listhead (ospf->areas); node; nextnode (node)) if ((range = ospf_area_range_match (node->data, p))) @@ -407,7 +407,7 @@ void ospf_abr_nssa_check_status (struct ospf *ospf) { struct ospf_area *area; - listnode lnode; + struct listnode *lnode; LIST_LOOP (ospf->areas, area, lnode) { @@ -477,7 +477,7 @@ void ospf_check_abr_status (struct ospf *ospf) { struct ospf_area *area; - listnode node; + struct listnode *node; int bb_configured = 0; int bb_act_attached = 0; int areas_configured = 0; @@ -774,7 +774,7 @@ int ospf_abr_nexthops_belong_to_area (struct ospf_route *or, struct ospf_area *area) { - listnode node; + struct listnode *node; struct ospf_path *path; LIST_LOOP (or->paths, path, node) @@ -843,7 +843,7 @@ ospf_abr_announce_network (struct ospf *ospf, { struct ospf_area_range *range; struct ospf_area *area, *or_area; - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("ospf_abr_announce_network(): Start"); @@ -950,7 +950,7 @@ ospf_abr_process_nssa_translates (struct ospf *ospf) flood install as approved in Type-5 LSDB with XLATE Flag on later, do same for all aggregates... At end, DISCARD all remaining UNAPPROVED Type-5's (Aggregate is for future ) */ - listnode node; + struct listnode *node; struct ospf_area *area; struct route_node *rn; struct ospf_lsa *lsa; @@ -1142,7 +1142,7 @@ void ospf_abr_announce_rtr (struct ospf *ospf, struct prefix_ipv4 *p, struct ospf_route *or) { - listnode node; + struct listnode *node; struct ospf_area *area; if (IS_DEBUG_OSPF_EVENT) @@ -1205,7 +1205,7 @@ ospf_abr_process_router_rt (struct ospf *ospf, struct route_table *rt) for (rn = route_top (rt); rn; rn = route_next (rn)) { - listnode node; + struct listnode *node; char flag = 0; struct ospf_route *best = NULL; @@ -1326,7 +1326,7 @@ ospf_abr_unapprove_translates (struct ospf *ospf) /* For NSSA Translations */ void ospf_abr_unapprove_summaries (struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_area *area; struct route_node *rn; struct ospf_lsa *lsa; @@ -1369,7 +1369,7 @@ ospf_abr_unapprove_summaries (struct ospf *ospf) void ospf_abr_prepare_aggregates (struct ospf *ospf) { - listnode node; + struct listnode *node; struct route_node *rn; struct ospf_area_range *range; @@ -1399,7 +1399,7 @@ ospf_abr_announce_aggregates (struct ospf *ospf) struct ospf_area_range *range; struct route_node *rn; struct prefix p; - listnode node, n; + struct listnode *node, *n; if (IS_DEBUG_OSPF_EVENT) zlog_info ("ospf_abr_announce_aggregates(): Start"); @@ -1479,7 +1479,7 @@ ospf_abr_announce_aggregates (struct ospf *ospf) void ospf_abr_send_nssa_aggregates (struct ospf *ospf) /* temporarily turned off */ { - listnode node; /*, n; */ + struct listnode *node; /*, n; */ struct ospf_area *area; /*, *ar; */ struct route_node *rn; struct ospf_area_range *range; @@ -1550,7 +1550,7 @@ ospf_abr_send_nssa_aggregates (struct ospf *ospf) /* temporarily turned off */ void ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */ { - listnode node; + struct listnode *node; struct ospf_area *area; if (! IS_OSPF_ABR (ospf)) @@ -1587,7 +1587,7 @@ ospf_abr_announce_nssa_defaults (struct ospf *ospf) /* By ABR-Translator */ void ospf_abr_announce_stub_defaults (struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_area *area; struct prefix_ipv4 p; @@ -1667,7 +1667,7 @@ ospf_abr_remove_unapproved_translates (struct ospf *ospf) void ospf_abr_remove_unapproved_summaries (struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_area *area; struct route_node *rn; struct ospf_lsa *lsa; @@ -1701,7 +1701,7 @@ ospf_abr_remove_unapproved_summaries (struct ospf *ospf) void ospf_abr_manage_discard_routes (struct ospf *ospf) { - listnode node; + struct listnode *node; struct route_node *rn; struct ospf_area *area; struct ospf_area_range *range; diff --git a/ospfd/ospf_ase.c b/ospfd/ospf_ase.c index c7b343c3..43951e9f 100644 --- a/ospfd/ospf_ase.c +++ b/ospfd/ospf_ase.c @@ -54,8 +54,8 @@ ospf_find_asbr_route (struct ospf *ospf, { struct route_node *rn; struct ospf_route *or, *best = NULL; - listnode node; - list chosen; + struct listnode *node; + struct list *chosen; /* Sanity check. */ if (rtrs == NULL) @@ -71,7 +71,7 @@ ospf_find_asbr_route (struct ospf *ospf, /* First try to find intra-area non-bb paths. */ if (!CHECK_FLAG (ospf->config, OSPF_RFC1583_COMPATIBLE)) - for (node = listhead ((list) rn->info); node; nextnode (node)) + for (node = listhead ((struct list *) rn->info); node; nextnode (node)) if ((or = getdata (node)) != NULL) if (or->cost < OSPF_LS_INFINITY) if (!OSPF_IS_AREA_ID_BACKBONE (or->u.std.area_id) && @@ -121,12 +121,12 @@ ospf_find_asbr_route_through_area (struct route_table *rtrs, if (rn) { - listnode node; + struct listnode *node; struct ospf_route *or; route_unlock_node (rn); - for (node = listhead ((list) rn->info); node; nextnode (node)) + for (node = listhead ((struct list *) rn->info); node; nextnode (node)) if ((or = getdata (node)) != NULL) if (IPV4_ADDR_SAME (&or->u.std.area_id, &area->area_id)) return or; @@ -138,7 +138,7 @@ ospf_find_asbr_route_through_area (struct route_table *rtrs, void ospf_ase_complete_direct_routes (struct ospf_route *ro, struct in_addr nexthop) { - listnode node; + struct listnode *node; struct ospf_path *op; for (node = listhead (ro->paths); node; nextnode (node)) @@ -150,7 +150,7 @@ ospf_ase_complete_direct_routes (struct ospf_route *ro, struct in_addr nexthop) int ospf_ase_forward_address_check (struct ospf *ospf, struct in_addr fwd_addr) { - listnode ifn; + struct listnode *ifn; struct ospf_interface *oi; for (ifn = listhead (ospf->oiflist); ifn; nextnode (ifn)) @@ -530,8 +530,8 @@ ospf_ase_route_match_same (struct route_table *rt, struct prefix *prefix, struct ospf_route *or; struct ospf_path *op; struct ospf_path *newop; - listnode n1; - listnode n2; + struct listnode *n1; + struct listnode *n2; if (! rt || ! prefix) return 0; @@ -611,7 +611,7 @@ ospf_ase_calculate_timer (struct thread *t) struct ospf *ospf; struct ospf_lsa *lsa; struct route_node *rn; - listnode node; + struct listnode *node; struct ospf_area *area; ospf = THREAD_ARG (t); @@ -680,7 +680,7 @@ ospf_ase_register_external_lsa (struct ospf_lsa *lsa, struct ospf *top) { struct route_node *rn; struct prefix_ipv4 p; - list lst; + struct list *lst; struct as_external_lsa *al; al = (struct as_external_lsa *) lsa->data; @@ -704,7 +704,7 @@ ospf_ase_unregister_external_lsa (struct ospf_lsa *lsa, struct ospf *top) { struct route_node *rn; struct prefix_ipv4 p; - list lst; + struct list *lst; struct as_external_lsa *al; al = (struct as_external_lsa *) lsa->data; @@ -734,8 +734,8 @@ ospf_ase_external_lsas_finish (struct route_table *rt) { struct route_node *rn; struct ospf_lsa *lsa; - list lst; - listnode node; + struct list *lst; + struct listnode *node; for (rn = route_top (rt); rn; rn = route_next (rn)) if ((lst = rn->info) != NULL) @@ -752,8 +752,8 @@ ospf_ase_external_lsas_finish (struct route_table *rt) void ospf_ase_incremental_update (struct ospf *ospf, struct ospf_lsa *lsa) { - list lsas; - listnode node; + struct list *lsas; + struct listnode *node; struct route_node *rn, *rn2; struct prefix_ipv4 p; struct route_table *tmp_old; diff --git a/ospfd/ospf_flood.c b/ospfd/ospf_flood.c index b706279e..c1d2131a 100644 --- a/ospfd/ospf_flood.c +++ b/ospfd/ospf_flood.c @@ -116,7 +116,7 @@ ospf_process_self_originated_lsa (struct ospf *ospf, { struct ospf_interface *oi; struct external_info *ei; - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("LSA[Type%d:%s]: Process self-originated LSA seq 0x%x", @@ -569,7 +569,7 @@ int ospf_flood_through_area (struct ospf_area *area, struct ospf_neighbor *inbr, struct ospf_lsa *lsa) { - listnode node; + struct listnode *node; int lsa_ack_flag = 0; /* All other types are specific to a single area (Area A). The @@ -608,7 +608,7 @@ int ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, struct ospf_lsa *lsa) { - listnode node; + struct listnode *node; int lsa_ack_flag; lsa_ack_flag = 0; @@ -632,7 +632,7 @@ ospf_flood_through_as (struct ospf *ospf, struct ospf_neighbor *inbr, { int continue_flag = 0; struct ospf_area *area = getdata (node); - listnode if_node; + struct listnode *if_node; switch (area->external_routing) { @@ -965,7 +965,7 @@ void ospf_ls_retransmit_delete_nbr_area (struct ospf_area *area, struct ospf_lsa *lsa) { - listnode node; + struct listnode *node; for (node = listhead (area->oiflist); node; nextnode (node)) ospf_ls_retransmit_delete_nbr_if (getdata (node), lsa); @@ -974,7 +974,7 @@ ospf_ls_retransmit_delete_nbr_area (struct ospf_area *area, void ospf_ls_retransmit_delete_nbr_as (struct ospf *ospf, struct ospf_lsa *lsa) { - listnode node; + struct listnode *node; for (node = listhead (ospf->oiflist); node; nextnode (node)) ospf_ls_retransmit_delete_nbr_if (getdata (node), lsa); diff --git a/ospfd/ospf_ia.c b/ospfd/ospf_ia.c index bea26575..ff47f4fe 100644 --- a/ospfd/ospf_ia.c +++ b/ospfd/ospf_ia.c @@ -55,14 +55,14 @@ ospf_find_abr_route (struct route_table *rtrs, { struct route_node *rn; struct ospf_route *or; - listnode node; + struct listnode *node; if ((rn = route_node_lookup (rtrs, (struct prefix *) abr)) == NULL) return NULL; route_unlock_node (rn); - for (node = listhead ((list) rn->info); node; nextnode (node)) + for (node = listhead ((struct list *) rn->info); node; nextnode (node)) if ((or = getdata (node)) != NULL) if (IPV4_ADDR_SAME (&or->u.std.area_id, &area->area_id) && (or->u.std.flags & ROUTER_LSA_BORDER)) return or; @@ -611,7 +611,7 @@ ospf_ia_routing (struct ospf *ospf, if (IS_OSPF_ABR (ospf)) { - listnode node; + struct listnode *node; struct ospf_area *area; switch (ospf->abr_type) @@ -622,7 +622,7 @@ ospf_ia_routing (struct ospf *ospf, if ((area = ospf->backbone)) { - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) { @@ -707,7 +707,7 @@ ospf_ia_routing (struct ospf *ospf, } else { - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("ospf_ia_routing():not ABR, considering all areas"); diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index f7e200c3..277d508b 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -239,7 +239,7 @@ void ospf_if_cleanup (struct ospf_interface *oi) { struct route_node *rn; - listnode node; + struct listnode *node; struct ospf_neighbor *nbr; /* oi->nbrs and oi->nbr_nbma should be deletete on InterafceDown event */ @@ -343,7 +343,7 @@ ospf_if_free (struct ospf_interface *oi) struct ospf_interface * ospf_if_is_configured (struct ospf *ospf, struct in_addr *address) { - listnode node; + struct listnode *node; struct ospf_interface *oi; struct prefix *addr; @@ -371,7 +371,7 @@ ospf_if_is_up (struct ospf_interface *oi) struct ospf_interface * ospf_if_exists (struct ospf_interface *oic) { - listnode node; + struct listnode *node; struct ospf *ospf; struct ospf_interface *oi; @@ -389,7 +389,7 @@ struct ospf_interface * ospf_if_lookup_by_local_addr (struct ospf *ospf, struct interface *ifp, struct in_addr address) { - listnode node; + struct listnode *node; struct ospf_interface *oi; for (node = listhead (ospf->oiflist); node; nextnode (node)) @@ -408,7 +408,7 @@ ospf_if_lookup_by_local_addr (struct ospf *ospf, struct ospf_interface * ospf_if_lookup_by_prefix (struct ospf *ospf, struct prefix_ipv4 *p) { - listnode node; + struct listnode *node; struct ospf_interface *oi; struct prefix ptmp; @@ -437,7 +437,7 @@ ospf_if_lookup_by_prefix (struct ospf *ospf, struct prefix_ipv4 *p) struct ospf_interface * ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src) { - listnode node; + struct listnode *node; struct prefix_ipv4 addr; struct ospf_interface *oi, *match; @@ -854,7 +854,7 @@ struct ospf_vl_data * ospf_vl_lookup (struct ospf_area *area, struct in_addr vl_peer) { struct ospf_vl_data *vl_data; - listnode node; + struct listnode *node; for (node = listhead (area->ospf->vlinks); node; nextnode (node)) if ((vl_data = getdata (node)) != NULL) @@ -909,7 +909,7 @@ ospf_vl_set_params (struct ospf_vl_data *vl_data, struct vertex *v) { int changed = 0; struct ospf_interface *voi; - listnode node; + struct listnode *node; struct vertex_nexthop *nh; int i; struct router_lsa *rl; @@ -994,7 +994,7 @@ ospf_vl_up_check (struct ospf_area *area, struct in_addr rid, struct vertex *v) { struct ospf *ospf = area->ospf; - listnode node; + struct listnode *node; struct ospf_vl_data *vl_data; struct ospf_interface *oi; @@ -1053,7 +1053,7 @@ ospf_vl_up_check (struct ospf_area *area, struct in_addr rid, void ospf_vl_unapprove (struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_vl_data *vl_data; for (node = listhead (ospf->vlinks); node; nextnode (node)) @@ -1064,7 +1064,7 @@ ospf_vl_unapprove (struct ospf *ospf) void ospf_vl_shut_unapproved (struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_vl_data *vl_data; for (node = listhead (ospf->vlinks); node; nextnode (node)) @@ -1089,7 +1089,7 @@ ospf_full_virtual_nbrs (struct ospf_area *area) int ospf_vls_in_area (struct ospf_area *area) { - listnode node; + struct listnode *node; struct ospf_vl_data *vl_data; int c = 0; @@ -1114,15 +1114,15 @@ ospf_crypt_key_new () } void -ospf_crypt_key_add (list crypt, struct crypt_key *ck) +ospf_crypt_key_add (struct list *crypt, struct crypt_key *ck) { listnode_add (crypt, ck); } struct crypt_key * -ospf_crypt_key_lookup (list auth_crypt, u_char key_id) +ospf_crypt_key_lookup (struct list *auth_crypt, u_char key_id) { - listnode node; + struct listnode *node; struct crypt_key *ck; for (node = listhead (auth_crypt); node; nextnode (node)) @@ -1136,9 +1136,9 @@ ospf_crypt_key_lookup (list auth_crypt, u_char key_id) } int -ospf_crypt_key_delete (list auth_crypt, u_char key_id) +ospf_crypt_key_delete (struct list *auth_crypt, u_char key_id) { - listnode node; + struct listnode *node; struct crypt_key *ck; for (node = listhead (auth_crypt); node; nextnode (node)) diff --git a/ospfd/ospf_interface.h b/ospfd/ospf_interface.h index 6f54618b..cdab122a 100644 --- a/ospfd/ospf_interface.h +++ b/ospfd/ospf_interface.h @@ -58,7 +58,7 @@ struct ospf_if_params u_char auth_simple[OSPF_AUTH_SIMPLE_SIZE + 1]; /* Simple password. */ u_char auth_simple__config:1; - DECLARE_IF_PARAM (list, auth_crypt); /* List of Auth cryptographic data. */ + DECLARE_IF_PARAM (struct list *, auth_crypt); /* List of Auth cryptographic data. */ DECLARE_IF_PARAM (int, auth_type); /* OSPF authentication type */ }; @@ -141,7 +141,7 @@ struct ospf_interface #define PRIORITY(I) ((I)->nbr_self->priority) /* List of configured NBMA neighbor. */ - list nbr_nbma; + struct list *nbr_nbma; /* self-originated LSAs. */ struct ospf_lsa *network_lsa_self; /* network-LSA. */ @@ -151,11 +151,11 @@ struct ospf_interface struct route_table *ls_upd_queue; - list ls_ack; /* Link State Acknowledgment list. */ + struct list *ls_ack; /* Link State Acknowledgment list. */ struct { - list ls_ack; + struct list *ls_ack; struct in_addr dst; } ls_ack_direct; @@ -242,9 +242,9 @@ void ospf_vl_shut_unapproved (struct ospf *); int ospf_full_virtual_nbrs (struct ospf_area *); int ospf_vls_in_area (struct ospf_area *); -struct crypt_key *ospf_crypt_key_lookup (list, u_char); +struct crypt_key *ospf_crypt_key_lookup (struct list *, u_char); struct crypt_key *ospf_crypt_key_new (); -void ospf_crypt_key_add (list, struct crypt_key *); -int ospf_crypt_key_delete (list, u_char); +void ospf_crypt_key_add (struct list *, struct crypt_key *); +int ospf_crypt_key_delete (struct list *, u_char); #endif /* _ZEBRA_OSPF_INTERFACE_H */ diff --git a/ospfd/ospf_ism.c b/ospfd/ospf_ism.c index 5f4d5461..7fa8b460 100644 --- a/ospfd/ospf_ism.c +++ b/ospfd/ospf_ism.c @@ -46,9 +46,9 @@ /* elect DR and BDR. Refer to RFC2319 section 9.4 */ struct ospf_neighbor * -ospf_dr_election_sub (list routers) +ospf_dr_election_sub (struct list *routers) { - listnode node; + struct listnode *node; struct ospf_neighbor *nbr, *max = NULL; /* Choose highest router priority. @@ -73,10 +73,10 @@ ospf_dr_election_sub (list routers) } struct ospf_neighbor * -ospf_elect_dr (struct ospf_interface *oi, list el_list) +ospf_elect_dr (struct ospf_interface *oi, struct list *el_list) { - list dr_list; - listnode node; + struct list *dr_list; + struct listnode *node; struct ospf_neighbor *nbr, *dr = NULL, *bdr = NULL; dr_list = list_new (); @@ -116,10 +116,10 @@ ospf_elect_dr (struct ospf_interface *oi, list el_list) } struct ospf_neighbor * -ospf_elect_bdr (struct ospf_interface *oi, list el_list) +ospf_elect_bdr (struct ospf_interface *oi, struct list *el_list) { - list bdr_list, no_dr_list; - listnode node; + struct list *bdr_list, *no_dr_list; + struct listnode *node; struct ospf_neighbor *nbr, *bdr = NULL; bdr_list = list_new (); @@ -174,7 +174,7 @@ ospf_ism_state (struct ospf_interface *oi) } void -ospf_dr_eligible_routers (struct route_table *nbrs, list el_list) +ospf_dr_eligible_routers (struct route_table *nbrs, struct list *el_list) { struct route_node *rn; struct ospf_neighbor *nbr; @@ -213,7 +213,7 @@ ospf_dr_election (struct ospf_interface *oi) { struct in_addr old_dr, old_bdr; int old_state, new_state; - list el_list; + struct list *el_list; struct ospf_neighbor *dr, *bdr; /* backup current values. */ diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 60c7aada..34d71b6c 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -364,7 +364,7 @@ const char * dump_lsa_key (struct ospf_lsa *lsa) { static char buf[] = { - "Type255,id(255.255.255.255),ar(255.255.255.255)", + "Type255,id(255.255.255.255),ar(255.255.255.255)" }; struct lsa_header *lsah; @@ -655,7 +655,7 @@ lsa_link_ptomp_set (struct stream *s, struct ospf_interface *oi) int router_lsa_link_set (struct stream *s, struct ospf_area *area) { - listnode node; + struct listnode *node; int links = 0; for (node = listhead (area->oiflist); node; node = nextnode (node)) @@ -890,7 +890,7 @@ int ospf_router_lsa_update_timer (struct thread *thread) { struct ospf *ospf = THREAD_ARG (thread); - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF (lsa, LSA_GENERATE)) zlog_info ("Timer[router-LSA Update]: (timer expire)"); @@ -1396,7 +1396,7 @@ ospf_external_lsa_nexthop_get (struct ospf *ospf, struct in_addr nexthop) { struct in_addr fwd; struct prefix nh; - listnode n1; + struct listnode *n1; fwd.s_addr = 0; @@ -1444,7 +1444,7 @@ ospf_get_nssa_ip (struct ospf_area *area) { struct in_addr fwd; struct in_addr best_default; - listnode n1; + struct listnode *n1; fwd.s_addr = 0; best_default.s_addr = 0; @@ -1618,7 +1618,7 @@ ospf_install_flood_nssa (struct ospf *ospf, { struct ospf_lsa *new; struct as_external_lsa *extlsa; - listnode node; + struct listnode *node; /* LSA may be a Type-5 originated via translation of a Type-7 LSA * which originated from an NSSA area. In which case it should not be @@ -1863,7 +1863,7 @@ ospf_translated_nssa_refresh (struct ospf *ospf, struct ospf_lsa *type7, /* find the type-7 from which supplied type-5 was translated, * ie find first type-7 with same LSA Id. */ - listnode ln; + struct listnode *ln; struct route_node *rn; struct ospf_lsa *lsa; struct ospf_area *area; @@ -2749,7 +2749,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, int ospf_check_nbr_status (struct ospf *ospf) { - listnode node; + struct listnode *node; for (node = listhead (ospf->oiflist); node; node = nextnode (node)) { @@ -2805,8 +2805,8 @@ int ospf_maxage_lsa_remover (struct thread *thread) { struct ospf *ospf = THREAD_ARG (thread); - listnode node; - listnode next; + struct listnode *node; + struct listnode *next; int reschedule = 0; ospf->t_maxage = NULL; @@ -2871,7 +2871,7 @@ ospf_maxage_lsa_remover (struct thread *thread) int ospf_lsa_maxage_exist (struct ospf *ospf, struct ospf_lsa *new) { - listnode node; + struct listnode *node; for (node = listhead (ospf->maxage_lsa); node; nextnode (node)) if (((struct ospf_lsa *) node->data) == new) @@ -2883,7 +2883,7 @@ ospf_lsa_maxage_exist (struct ospf *ospf, struct ospf_lsa *new) void ospf_lsa_maxage_delete (struct ospf *ospf, struct ospf_lsa *lsa) { - listnode n; + struct listnode *n; if ((n = listnode_lookup (ospf->maxage_lsa, lsa))) { @@ -2965,7 +2965,7 @@ ospf_lsa_maxage_walker (struct thread *thread) struct ospf *ospf = THREAD_ARG (thread); struct route_node *rn; struct ospf_lsa *lsa; - listnode node; + struct listnode *node; ospf->t_maxage_walker = NULL; @@ -3292,7 +3292,7 @@ ospf_lsa_flush_schedule (struct ospf *ospf, struct ospf_lsa *lsa) void ospf_flush_self_originated_lsas_now (struct ospf *ospf) { - listnode n1, n2; + struct listnode *n1, *n2; struct ospf_area *area; struct ospf_interface *oi; struct ospf_lsa *lsa; @@ -3379,7 +3379,7 @@ ospf_flush_self_originated_lsas_now (struct ospf *ospf) int ospf_lsa_is_self_originated (struct ospf *ospf, struct ospf_lsa *lsa) { - listnode node; + struct listnode *node; /* This LSA is already checked. */ if (CHECK_FLAG (lsa->flags, OSPF_LSA_SELF_CHECKED)) @@ -3646,7 +3646,7 @@ ospf_refresher_unregister_lsa (struct ospf *ospf, struct ospf_lsa *lsa) assert (CHECK_FLAG (lsa->flags, OSPF_LSA_SELF)); if (lsa->refresh_list >= 0) { - list refresh_list = ospf->lsa_refresh_queue.qs[lsa->refresh_list]; + struct list *refresh_list = ospf->lsa_refresh_queue.qs[lsa->refresh_list]; listnode_delete (refresh_list, lsa); if (!listcount (refresh_list)) { @@ -3661,11 +3661,11 @@ ospf_refresher_unregister_lsa (struct ospf *ospf, struct ospf_lsa *lsa) int ospf_lsa_refresh_walker (struct thread *t) { - list refresh_list; - listnode node; + struct list *refresh_list; + struct listnode *node; struct ospf *ospf = THREAD_ARG (t); int i; - list lsa_to_refresh = list_new (); + struct list *lsa_to_refresh = list_new (); if (IS_DEBUG_OSPF (lsa, LSA_REFRESH)) zlog_info ("LSA[Refresh]:ospf_lsa_refresh_walker(): start"); @@ -3697,7 +3697,7 @@ ospf_lsa_refresh_walker (struct thread *t) { for (node = listhead (refresh_list); node;) { - listnode next; + struct listnode *next; struct ospf_lsa *lsa = getdata (node); next = node->next; diff --git a/ospfd/ospf_neighbor.c b/ospfd/ospf_neighbor.c index 6f2d4a05..511b292d 100644 --- a/ospfd/ospf_neighbor.c +++ b/ospfd/ospf_neighbor.c @@ -294,7 +294,7 @@ ospf_nbr_lookup_by_routerid (struct route_table *nbrs, void ospf_renegotiate_optional_capabilities (struct ospf *top) { - listnode node; + struct listnode *node; struct ospf_interface *oi; struct route_table *nbrs; struct route_node *rn; @@ -353,7 +353,7 @@ ospf_nbr_add (struct ospf_interface *oi, struct ospf_header *ospfh, if (oi->type == OSPF_IFTYPE_NBMA) { struct ospf_nbr_nbma *nbr_nbma; - listnode node; + struct listnode *node; for (node = listhead (oi->nbr_nbma); node; nextnode (node)) { diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c index a41627f8..c4ecb795 100644 --- a/ospfd/ospf_packet.c +++ b/ospfd/ospf_packet.c @@ -48,7 +48,7 @@ #include "ospfd/ospf_flood.h" #include "ospfd/ospf_dump.h" -static void ospf_ls_ack_send_list (struct ospf_interface *, list, +static void ospf_ls_ack_send_list (struct ospf_interface *, struct list *, struct in_addr); /* Packet Type String. */ @@ -418,7 +418,7 @@ ospf_ls_upd_timer (struct thread *thread) /* Send Link State Update. */ if (ospf_ls_retransmit_count (nbr) > 0) { - list update; + struct list *update; struct ospf_lsdb *lsdb; int i; struct timeval now; @@ -520,7 +520,7 @@ ospf_write (struct thread *thread) u_char type; int ret; int flags = 0; - listnode node; + struct listnode *node; static u_int16_t ipid = 0; u_int16_t maxdatasize, offset; #define OSPF_WRITE_IPHL_SHIFT 2 @@ -1328,7 +1328,7 @@ ospf_ls_req (struct ip *iph, struct ospf_header *ospfh, struct in_addr ls_id; struct in_addr adv_router; struct ospf_lsa *find; - list ls_upd; + struct list *ls_upd; int length; /* Increment statistics. */ @@ -1417,7 +1417,7 @@ ospf_ls_req (struct ip *iph, struct ospf_header *ospfh, /* Get the list of LSAs from Link State Update packet. And process some validation -- RFC2328 Section 13. (1)-(2). */ -static list +static struct list * ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s, struct ospf_interface *oi, size_t size) { @@ -1425,7 +1425,7 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s, u_int32_t length; struct lsa_header *lsah; struct ospf_lsa *lsa; - list lsas; + struct list *lsas; lsas = list_new (); @@ -1536,9 +1536,9 @@ ospf_ls_upd_list_lsa (struct ospf_neighbor *nbr, struct stream *s, /* Cleanup Update list. */ void -ospf_upd_list_clean (list lsas) +ospf_upd_list_clean (struct list *lsas) { - listnode node; + struct listnode *node; struct ospf_lsa *lsa; for (node = listhead (lsas); node; nextnode (node)) @@ -1554,11 +1554,11 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, struct stream *s, struct ospf_interface *oi, u_int16_t size) { struct ospf_neighbor *nbr; - list lsas; + struct list *lsas; #ifdef HAVE_OPAQUE_LSA - list mylsa_acks, mylsa_upds; + struct list *mylsa_acks, *mylsa_upds; #endif /* HAVE_OPAQUE_LSA */ - listnode node, next; + struct listnode *node, *next; struct ospf_lsa *lsa = NULL; /* unsigned long ls_req_found = 0; */ @@ -1750,7 +1750,7 @@ ospf_ls_upd (struct ip *iph, struct ospf_header *ospfh, if(lsa->data->type == OSPF_NETWORK_LSA) { - listnode oi_node; + struct listnode *oi_node; int Flag = 0; for(oi_node = listhead(oi->ospf->oiflist); oi_node; oi_node = nextnode(oi_node)) @@ -2070,7 +2070,7 @@ ospf_associate_packet_vl (struct ospf *ospf, struct interface *ifp, struct ospf_interface *rcv_oi; struct ospf_vl_data *vl_data; struct ospf_area *vl_area; - listnode node; + struct listnode *node; if (IN_MULTICAST (ntohl (iph->ip_dst.s_addr)) || !OSPF_IS_AREA_BACKBONE (ospfh)) @@ -2786,10 +2786,10 @@ ls_age_increment (struct ospf_lsa *lsa, int delay) } int -ospf_make_ls_upd (struct ospf_interface *oi, list update, struct stream *s) +ospf_make_ls_upd (struct ospf_interface *oi, struct list *update, struct stream *s) { struct ospf_lsa *lsa; - listnode node; + struct listnode *node; u_int16_t length = OSPF_LS_UPD_MIN_SIZE; unsigned long delta = stream_get_putp (s); unsigned long pp; @@ -2848,10 +2848,10 @@ ospf_make_ls_upd (struct ospf_interface *oi, list update, struct stream *s) } int -ospf_make_ls_ack (struct ospf_interface *oi, list ack, struct stream *s) +ospf_make_ls_ack (struct ospf_interface *oi, struct list *ack, struct stream *s) { - list rm_list; - listnode node; + struct list *rm_list; + struct listnode *node; u_int16_t length = OSPF_LS_ACK_MIN_SIZE; unsigned long delta = stream_get_putp(s) + 24; struct ospf_lsa *lsa; @@ -3169,7 +3169,7 @@ void ospf_ls_upd_send_lsa (struct ospf_neighbor *nbr, struct ospf_lsa *lsa, int flag) { - list update; + struct list *update; update = list_new (); @@ -3242,7 +3242,7 @@ ospf_ls_upd_packet_new (struct list *update, struct ospf_interface *oi) } static void -ospf_ls_upd_queue_send (struct ospf_interface *oi, list update, +ospf_ls_upd_queue_send (struct ospf_interface *oi, struct list *update, struct in_addr addr) { struct ospf_packet *op; @@ -3329,12 +3329,12 @@ ospf_ls_upd_send_queue_event (struct thread *thread) } void -ospf_ls_upd_send (struct ospf_neighbor *nbr, list update, int flag) +ospf_ls_upd_send (struct ospf_neighbor *nbr, struct list *update, int flag) { struct ospf_interface *oi; struct prefix_ipv4 p; struct route_node *rn; - listnode n; + struct listnode *n; oi = nbr->oi; @@ -3378,7 +3378,8 @@ ospf_ls_upd_send (struct ospf_neighbor *nbr, list update, int flag) } static void -ospf_ls_ack_send_list (struct ospf_interface *oi, list ack, struct in_addr dst) +ospf_ls_ack_send_list (struct ospf_interface *oi, struct list *ack, + struct in_addr dst) { struct ospf_packet *op; u_int16_t length = OSPF_HEADER_SIZE; diff --git a/ospfd/ospf_packet.h b/ospfd/ospf_packet.h index a439aa39..48f4e13d 100644 --- a/ospfd/ospf_packet.h +++ b/ospfd/ospf_packet.h @@ -153,7 +153,7 @@ void ospf_db_desc_send (struct ospf_neighbor *); void ospf_db_desc_resend (struct ospf_neighbor *); void ospf_ls_req_send (struct ospf_neighbor *); void ospf_ls_upd_send_lsa (struct ospf_neighbor *, struct ospf_lsa *, int); -void ospf_ls_upd_send (struct ospf_neighbor *, list, int); +void ospf_ls_upd_send (struct ospf_neighbor *, struct list *, int); void ospf_ls_ack_send (struct ospf_neighbor *, struct ospf_lsa *); void ospf_ls_ack_send_delayed (struct ospf_interface *); void ospf_ls_retransmit (struct ospf_interface *, struct ospf_lsa *); diff --git a/ospfd/ospf_route.c b/ospfd/ospf_route.c index 9f3efb14..9280767f 100644 --- a/ospfd/ospf_route.c +++ b/ospfd/ospf_route.c @@ -136,8 +136,8 @@ ospf_route_match_same (struct route_table *rt, struct prefix_ipv4 *prefix, struct ospf_route *or; struct ospf_path *op; struct ospf_path *newop; - listnode n1; - listnode n2; + struct listnode *n1; + struct listnode *n2; if (! rt || ! prefix) return 0; @@ -279,7 +279,7 @@ ospf_intra_route_add (struct route_table *rt, struct vertex *v, struct prefix_ipv4 p; struct ospf_path *path; struct vertex_nexthop *nexthop; - listnode nnode; + struct listnode *nnode; p.family = AF_INET; p.prefix = v->id; @@ -656,7 +656,7 @@ ospf_route_table_dump (struct route_table *rt) struct ospf_route *or; char buf1[BUFSIZ]; char buf2[BUFSIZ]; - listnode pnode; + struct listnode *pnode; struct ospf_path *path; #if 0 @@ -698,7 +698,7 @@ void ospf_terminate () { struct ospf *ospf; - listnode node; + struct listnode *node; LIST_LOOP (om->ospf, ospf, node) { @@ -786,7 +786,7 @@ int ospf_path_exist (struct list *plist, struct in_addr nexthop, struct ospf_interface *oi) { - listnode node; + struct listnode *node; struct ospf_path *path; for (node = listhead (plist); node; nextnode (node)) @@ -803,7 +803,7 @@ void ospf_route_copy_nexthops_from_vertex (struct ospf_route *to, struct vertex *v) { - listnode nnode; + struct listnode *nnode; struct ospf_path *path; struct vertex_nexthop *nexthop; @@ -827,9 +827,9 @@ ospf_route_copy_nexthops_from_vertex (struct ospf_route *to, } struct ospf_path * -ospf_path_lookup (list plist, struct ospf_path *path) +ospf_path_lookup (struct list *plist, struct ospf_path *path) { - listnode node; + struct listnode *node; for (node = listhead (plist); node; nextnode (node)) { @@ -844,9 +844,9 @@ ospf_path_lookup (list plist, struct ospf_path *path) } void -ospf_route_copy_nexthops (struct ospf_route *to, list from) +ospf_route_copy_nexthops (struct ospf_route *to, struct list *from) { - listnode node; + struct listnode *node; assert (to->paths); @@ -857,7 +857,7 @@ ospf_route_copy_nexthops (struct ospf_route *to, list from) } void -ospf_route_subst_nexthops (struct ospf_route *to, list from) +ospf_route_subst_nexthops (struct ospf_route *to, struct list *from) { list_delete_all_node (to->paths); @@ -931,8 +931,8 @@ ospf_prune_unreachable_routers (struct route_table *rtrs) { struct route_node *rn, *next; struct ospf_route *or; - listnode node, nnext; - list paths; + struct listnode *node, *nnext; + struct list *paths; if (IS_DEBUG_OSPF_EVENT) zlog_info ("Pruning unreachable routers"); diff --git a/ospfd/ospf_route.h b/ospfd/ospf_route.h index 802aac6c..8aee5591 100644 --- a/ospfd/ospf_route.h +++ b/ospfd/ospf_route.h @@ -108,7 +108,7 @@ struct ospf_route u_char path_type; /* List of Paths. */ - list paths; + struct list *paths; /* Link State Cost. */ u_int32_t cost; /* i.e. metric. */ @@ -123,7 +123,7 @@ struct ospf_route struct ospf_path *ospf_path_new (); void ospf_path_free (struct ospf_path *); -struct ospf_path *ospf_path_lookup (list, struct ospf_path *); +struct ospf_path *ospf_path_lookup (struct list *, struct ospf_path *); struct ospf_route *ospf_route_new (); void ospf_route_free (struct ospf_route *); void ospf_route_delete (struct route_table *); @@ -142,7 +142,7 @@ void ospf_intra_add_stub (struct route_table *, struct router_lsa_link *, struct vertex *, struct ospf_area *); int ospf_route_cmp (struct ospf *, struct ospf_route *, struct ospf_route *); -void ospf_route_copy_nexthops (struct ospf_route *, list); +void ospf_route_copy_nexthops (struct ospf_route *, struct list *); void ospf_route_copy_nexthops_from_vertex (struct ospf_route *, struct vertex * ); @@ -151,7 +151,7 @@ void ospf_route_subst (struct route_node *, struct ospf_route *, void ospf_route_add (struct route_table *, struct prefix_ipv4 *, struct ospf_route *, struct ospf_route *); -void ospf_route_subst_nexthops (struct ospf_route *, list); +void ospf_route_subst_nexthops (struct ospf_route *, struct list *); void ospf_prune_unreachable_networks (struct route_table *); void ospf_prune_unreachable_routers (struct route_table *); int ospf_add_discard_route (struct route_table *, struct ospf_area *, diff --git a/ospfd/ospf_spf.c b/ospfd/ospf_spf.c index 5288531f..0fd39fa1 100644 --- a/ospfd/ospf_spf.c +++ b/ospfd/ospf_spf.c @@ -101,7 +101,7 @@ ospf_vertex_new (struct ospf_lsa *lsa) void ospf_vertex_free (struct vertex *v) { - listnode node; + struct listnode *node; list_delete (v->child); @@ -131,7 +131,7 @@ ospf_vertex_dump(char *msg, struct vertex *v, if (print_nexthops) { - listnode nnode; + struct listnode *nnode; for (nnode = listhead (v->nexthop); nnode; nextnode (nnode)) { char buf1[BUFSIZ]; @@ -154,7 +154,7 @@ ospf_vertex_dump(char *msg, struct vertex *v, if (print_children) { - listnode cnode; + struct listnode *cnode; for (cnode = listhead (v->child); cnode; nextnode (cnode)) { struct vertex *cv = getdata (cnode); @@ -170,7 +170,7 @@ void ospf_vertex_add_parent (struct vertex *v) { struct vertex_nexthop *nh; - listnode node; + struct listnode *node; for (node = listhead (v->nexthop); node; nextnode (node)) { @@ -225,10 +225,10 @@ ospf_spf_has_vertex (struct route_table *rv, struct route_table *nv, /* Find the vertex specified by the given id and LSA type * in vlist (the candidate list). */ -listnode -ospf_vertex_lookup (list vlist, struct in_addr id, int type) +struct listnode * +ospf_vertex_lookup (struct list *vlist, struct in_addr id, int type) { - listnode node; + struct listnode *node; struct vertex *v; for (node = listhead (vlist); node; nextnode (node)) @@ -310,10 +310,10 @@ ospf_lsa_has_link (struct lsa_header *w, struct lsa_header *v) * If it's not unique, free the nexthop entry. */ void -ospf_nexthop_add_unique (struct vertex_nexthop *new, list nexthop) +ospf_nexthop_add_unique (struct vertex_nexthop *new, struct list *nexthop) { struct vertex_nexthop *nh; - listnode node; + struct listnode *node; int match; match = 0; @@ -343,7 +343,7 @@ ospf_nexthop_add_unique (struct vertex_nexthop *new, list nexthop) /* Merge entries in list b into list a. */ void -ospf_nexthop_merge (list a, list b) +ospf_nexthop_merge (struct list *a, struct list *b) { struct listnode *n; @@ -460,7 +460,7 @@ void ospf_nexthop_calculation (struct ospf_area *area, struct vertex *v, struct vertex *w) { - listnode node; + struct listnode *node; struct vertex_nexthop *nh, *x; struct ospf_interface *oi = NULL; struct router_lsa_link *l = NULL; @@ -647,9 +647,9 @@ ospf_nexthop_calculation (struct ospf_area *area, /* Add a vertex to the SPF candidate list. */ void -ospf_install_candidate (list candidate, struct vertex *w) +ospf_install_candidate (struct list *candidate, struct vertex *w) { - listnode node; + struct listnode *node; struct vertex *cw; ospf_vertex_dump("ospf_install_candidate(): add to candidate list", w, 1, 1); @@ -694,7 +694,8 @@ ospf_install_candidate (list candidate, struct vertex *w) */ void ospf_spf_next (struct vertex *v, struct ospf_area *area, - list candidate, struct route_table *rv, struct route_table *nv) + struct list *candidate, struct route_table *rv, + struct route_table *nv) { struct ospf_lsa *w_lsa = NULL; struct vertex *w, *cw; @@ -702,7 +703,7 @@ ospf_spf_next (struct vertex *v, struct ospf_area *area, u_char *lim; struct router_lsa_link *l = NULL; struct in_addr *r; - listnode node; + struct listnode *node; int type = 0; /* If this is a router-LSA, and bit V of the router-LSA (see Section @@ -923,8 +924,8 @@ ospf_spf_route_free (struct route_table *table) void ospf_spf_dump (struct vertex *v, int i) { - listnode cnode; - listnode nnode; + struct listnode *cnode; + struct listnode *nnode; struct vertex_nexthop *nexthop; if (v->type == OSPF_VERTEX_ROUTER) @@ -961,7 +962,7 @@ void ospf_spf_process_stubs (struct ospf_area *area, struct vertex *v, struct route_table *rt) { - listnode cnode; + struct listnode *cnode; struct vertex *child; if (IS_DEBUG_OSPF_EVENT) @@ -1017,8 +1018,8 @@ void ospf_rtrs_free (struct route_table *rtrs) { struct route_node *rn; - list or_list; - listnode node; + struct list *or_list; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("Route: Router Routing Table free"); @@ -1042,9 +1043,9 @@ void ospf_rtrs_print (struct route_table *rtrs) { struct route_node *rn; - list or_list; - listnode ln; - listnode pnode; + struct list *or_list; + struct listnode *ln; + struct listnode *pnode; struct ospf_route *or; struct ospf_path *path; char buf1[BUFSIZ]; @@ -1105,8 +1106,8 @@ void ospf_spf_calculate (struct ospf_area *area, struct route_table *new_table, struct route_table *new_rtrs) { - list candidate; - listnode node; + struct list *candidate; + struct listnode *node; struct vertex *v; struct route_table *rv; struct route_table *nv; @@ -1221,7 +1222,7 @@ ospf_spf_calculate_timer (struct thread *thread) { struct ospf *ospf = THREAD_ARG (thread); struct route_table *new_table, *new_rtrs; - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("SPF: Timer (SPF calculation expire)"); diff --git a/ospfd/ospf_spf.h b/ospfd/ospf_spf.h index 928d98b7..25b1d79b 100644 --- a/ospfd/ospf_spf.h +++ b/ospfd/ospf_spf.h @@ -38,8 +38,8 @@ struct vertex struct lsa_header *lsa; /* Router or Network LSA */ u_int32_t distance; /* from root to this vertex */ int backlink; /* link index of back-link */ - list child; /* list of vertex: children in SPF tree*/ - list nexthop; /* list of vertex_nexthop from root to this vertex */ + struct list *child; /* list of vertex: children in SPF tree*/ + struct list *nexthop; /* list of vertex_nexthop from root to this vertex */ }; /* A nexthop taken on the root node to get to this (parent) vertex */ diff --git a/ospfd/ospf_vty.c b/ospfd/ospf_vty.c index 461574ae..6b0dabbd 100644 --- a/ospfd/ospf_vty.c +++ b/ospfd/ospf_vty.c @@ -2279,7 +2279,7 @@ DEFUN (ospf_auto_cost_reference_bandwidth, { struct ospf *ospf = vty->index; u_int32_t refbw; - listnode node; + struct listnode *node; refbw = strtol (argv[0], NULL, 10); if (refbw < 1 || refbw > 4294967) @@ -2310,7 +2310,7 @@ DEFUN (no_ospf_auto_cost_reference_bandwidth, "Use reference bandwidth method to assign OSPF cost\n") { struct ospf *ospf = vty->index; - listnode node; + struct listnode *node; if (ospf->ref_bandwidth == OSPF_DEFAULT_REF_BANDWIDTH) return CMD_SUCCESS; @@ -2438,7 +2438,7 @@ DEFUN (show_ip_ospf, IP_STR "OSPF information\n") { - listnode node; + struct listnode *node; struct ospf_area * area; struct ospf *ospf; @@ -2625,7 +2625,7 @@ DEFUN (show_ip_ospf_interface, { struct interface *ifp; struct ospf *ospf; - listnode node; + struct listnode *node; ospf = ospf_lookup (); @@ -2687,7 +2687,7 @@ DEFUN (show_ip_ospf_neighbor, "Neighbor list\n") { struct ospf *ospf; - listnode node; + struct listnode *node; ospf = ospf_lookup (); if (ospf == NULL) @@ -2717,7 +2717,7 @@ DEFUN (show_ip_ospf_neighbor_all, "include down status neighbor\n") { struct ospf *ospf = vty->index; - listnode node; + struct listnode *node; if (ospf == NULL) { @@ -2733,7 +2733,7 @@ DEFUN (show_ip_ospf_neighbor_all, for (node = listhead (ospf->oiflist); node; nextnode (node)) { struct ospf_interface *oi = getdata (node); - listnode nbr_node; + struct listnode *nbr_node; show_ip_ospf_neighbor_sub (vty, oi); @@ -2901,7 +2901,7 @@ DEFUN (show_ip_ospf_neighbor_id, "Neighbor ID\n") { struct ospf *ospf; - listnode node; + struct listnode *node; struct ospf_neighbor *nbr; struct in_addr router_id; int ret; @@ -2945,7 +2945,7 @@ DEFUN (show_ip_ospf_neighbor_detail, "detail of all neighbors\n") { struct ospf *ospf; - listnode node; + struct listnode *node; ospf = ospf_lookup (); if (ospf == NULL) @@ -2981,7 +2981,7 @@ DEFUN (show_ip_ospf_neighbor_detail_all, "include down status neighbor\n") { struct ospf *ospf; - listnode node; + struct listnode *node; ospf = ospf_lookup (); if (ospf == NULL) @@ -3004,7 +3004,7 @@ DEFUN (show_ip_ospf_neighbor_detail_all, if (oi->type == OSPF_IFTYPE_NBMA) { - listnode nd; + struct listnode *nd; for (nd = listhead (oi->nbr_nbma); nd; nextnode (nd)) { @@ -3530,7 +3530,7 @@ void show_lsa_detail (struct vty *vty, struct ospf *ospf, int type, struct in_addr *id, struct in_addr *adv_router) { - listnode node; + struct listnode *node; switch (type) { @@ -3579,7 +3579,7 @@ void show_lsa_detail_adv_router (struct vty *vty, struct ospf *ospf, int type, struct in_addr *adv_router) { - listnode node; + struct listnode *node; switch (type) { @@ -3612,7 +3612,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self) { struct ospf_lsa *lsa; struct route_node *rn; - listnode node; + struct listnode *node; int type; for (node = listhead (ospf->areas); node; nextnode (node)) @@ -3681,7 +3681,7 @@ show_ip_ospf_database_summary (struct vty *vty, struct ospf *ospf, int self) void show_ip_ospf_database_maxage (struct vty *vty, struct ospf *ospf) { - listnode node; + struct listnode *node; struct ospf_lsa *lsa; vty_out (vty, "%s MaxAge Link States:%s%s", @@ -6431,7 +6431,7 @@ show_ip_ospf_route_network (struct vty *vty, struct route_table *rt) { struct route_node *rn; struct ospf_route *or; - listnode pnode; + struct listnode *pnode; struct ospf_path *path; vty_out (vty, "============ OSPF network routing table ============%s", @@ -6484,7 +6484,7 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs) { struct route_node *rn; struct ospf_route *or; - listnode pn, nn; + struct listnode *pn, *nn; struct ospf_path *path; vty_out (vty, "============ OSPF router routing table =============%s", @@ -6496,7 +6496,7 @@ show_ip_ospf_route_router (struct vty *vty, struct route_table *rtrs) vty_out (vty, "R %-15s ", inet_ntoa (rn->p.u.prefix4)); - for (nn = listhead ((list) rn->info); nn; nextnode (nn)) + for (nn = listhead ((struct list *) rn->info); nn; nextnode (nn)) if ((or = getdata (nn)) != NULL) { if (flag++) @@ -6532,7 +6532,7 @@ show_ip_ospf_route_external (struct vty *vty, struct route_table *rt) { struct route_node *rn; struct ospf_route *er; - listnode pnode; + struct listnode *pnode; struct ospf_path *path; vty_out (vty, "============ OSPF external routing table ===========%s", @@ -6685,7 +6685,7 @@ char *ospf_int_type_str[] = int config_write_interface (struct vty *vty) { - listnode n1, n2; + struct listnode *n1, *n2; struct interface *ifp; struct crypt_key *ck; int write = 0; @@ -6899,7 +6899,7 @@ config_write_network_area (struct vty *vty, struct ospf *ospf) int config_write_ospf_area (struct vty *vty, struct ospf *ospf) { - listnode node; + struct listnode *node; u_char buf[INET_ADDRSTRLEN]; /* Area configuration print. */ @@ -7025,13 +7025,13 @@ config_write_ospf_nbr_nbma (struct vty *vty, struct ospf *ospf) int config_write_virtual_link (struct vty *vty, struct ospf *ospf) { - listnode node; + struct listnode *node; u_char buf[INET_ADDRSTRLEN]; /* Virtual-Link print */ for (node = listhead (ospf->vlinks); node; nextnode (node)) { - listnode n2; + struct listnode *n2; struct crypt_key *ck; struct ospf_vl_data *vl_data = getdata (node); struct ospf_interface *oi; @@ -7204,7 +7204,7 @@ int ospf_config_write (struct vty *vty) { struct ospf *ospf; - listnode node; + struct listnode *node; int write = 0; ospf = ospf_lookup (); diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index e42373c8..5520c089 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -315,7 +315,7 @@ ospf_zebra_add (struct prefix_ipv4 *p, struct ospf_route *or) int psize; struct stream *s; struct ospf_path *path; - listnode node; + struct listnode *node; if (zclient->redist[ZEBRA_ROUTE_OSPF]) { @@ -403,7 +403,7 @@ ospf_zebra_delete (struct prefix_ipv4 *p, struct ospf_route *or) struct zapi_ipv4 api; struct ospf_path *path; struct in_addr *nexthop; - listnode node; + struct listnode *node; if (zclient->redist[ZEBRA_ROUTE_OSPF]) { @@ -980,7 +980,7 @@ ospf_filter_update (struct access_list *access) int type; int abr_inv = 0; struct ospf_area *area; - listnode node; + struct listnode *node; /* If OSPF instatnce does not exist, return right now. */ ospf = ospf_lookup (); @@ -1048,7 +1048,7 @@ ospf_prefix_list_update (struct prefix_list *plist) int type; int abr_inv = 0; struct ospf_area *area; - listnode node; + struct listnode *node; /* If OSPF instatnce does not exist, return right now. */ ospf = ospf_lookup (); diff --git a/ospfd/ospfd.c b/ospfd/ospfd.c index 04b34fb7..bfde503d 100644 --- a/ospfd/ospfd.c +++ b/ospfd/ospfd.c @@ -70,9 +70,9 @@ void ospf_network_run (struct ospf *, struct prefix *, struct ospf_area *); /* Get Router ID from ospf interface list. */ struct in_addr -ospf_router_id_get (list if_list) +ospf_router_id_get (struct list *if_list) { - listnode node; + struct listnode *node; struct in_addr router_id; memset (&router_id, 0, sizeof (struct in_addr)); @@ -101,7 +101,7 @@ void ospf_router_id_update (struct ospf *ospf) { struct in_addr router_id, router_id_old; - listnode node; + struct listnode *node; if (IS_DEBUG_OSPF_EVENT) zlog_info ("Router-ID[OLD:%s]: Update", inet_ntoa (ospf->router_id)); @@ -287,7 +287,7 @@ ospf_finish (struct ospf *ospf) struct route_node *rn; struct ospf_nbr_nbma *nbr_nbma; struct ospf_lsa *lsa; - listnode node; + struct listnode *node; int i; #ifdef HAVE_OPAQUE_LSA @@ -578,7 +578,7 @@ struct ospf_area * ospf_area_lookup_by_area_id (struct ospf *ospf, struct in_addr area_id) { struct ospf_area *area; - listnode node; + struct listnode *node; for (node = listhead (ospf->areas); node; nextnode (node)) { @@ -743,7 +743,7 @@ void ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area) { struct interface *ifp; - listnode node; + struct listnode *node; /* Schedule Router ID Update. */ if (ospf->router_id_static.s_addr == 0) @@ -756,7 +756,7 @@ ospf_network_run (struct ospf *ospf, struct prefix *p, struct ospf_area *area) /* Get target interface. */ for (node = listhead (om->iflist); node; nextnode (node)) { - listnode cn; + struct listnode *cn; if ((ifp = getdata (node)) == NULL) continue; @@ -844,14 +844,14 @@ void ospf_ls_upd_queue_empty (struct ospf_interface *oi) { struct route_node *rn; - listnode node; - list lst; + struct listnode *node; + struct list *lst; struct ospf_lsa *lsa; /* empty ls update queue */ for (rn = route_top (oi->ls_upd_queue); rn; rn = route_next (rn)) - if ((lst = (list) rn->info)) + if ((lst = (struct list *) rn->info)) { for (node = listhead (lst); node; nextnode (node)) if ((lsa = getdata (node))) @@ -872,8 +872,8 @@ void ospf_if_update (struct ospf *ospf) { struct route_node *rn; - listnode node; - listnode next; + struct listnode *node; + struct listnode *next; struct ospf_network *network; struct ospf_area *area; @@ -931,7 +931,7 @@ ospf_if_update (struct ospf *ospf) void ospf_remove_vls_through_area (struct ospf *ospf, struct ospf_area *area) { - listnode node, next; + struct listnode *node, *next; struct ospf_vl_data *vl_data; for (node = listhead (ospf->vlinks); node; node = next) @@ -955,7 +955,7 @@ int ospf_area_type_msg_max = OSPF_AREA_TYPE_MAX; void ospf_area_type_set (struct ospf_area *area, int type) { - listnode node; + struct listnode *node; struct ospf_interface *oi; if (area->external_routing == type) @@ -1046,7 +1046,7 @@ int ospf_area_vlink_count (struct ospf *ospf, struct ospf_area *area) { struct ospf_vl_data *vl; - listnode node; + struct listnode *node; int count = 0; for (node = listhead (ospf->vlinks); node; nextnode (node)) @@ -1480,7 +1480,7 @@ ospf_nbr_nbma_lookup_next (struct ospf *ospf, struct in_addr *addr, int first) { #if 0 struct ospf_nbr_nbma *nbr_nbma; - listnode node; + struct listnode *node; #endif if (ospf == NULL) @@ -1513,7 +1513,7 @@ ospf_nbr_nbma_set (struct ospf *ospf, struct in_addr nbr_addr) struct ospf_interface *oi; struct prefix_ipv4 p; struct route_node *rn; - listnode node; + struct listnode *node; nbr_nbma = ospf_nbr_nbma_lookup (ospf, nbr_addr); if (nbr_nbma) diff --git a/ospfd/ospfd.h b/ospfd/ospfd.h index 988f4388..6910d39f 100644 --- a/ospfd/ospfd.h +++ b/ospfd/ospfd.h @@ -193,12 +193,12 @@ struct ospf #define DEFAULT_ORIGINATE_ALWAYS 2 u_int32_t ref_bandwidth; /* Reference Bandwidth (Kbps). */ struct route_table *networks; /* OSPF config networks. */ - list vlinks; /* Configured Virtual-Links. */ - list areas; /* OSPF areas. */ + struct list *vlinks; /* Configured Virtual-Links. */ + struct list *areas; /* OSPF areas. */ struct route_table *nbr_nbma; struct ospf_area *backbone; /* Pointer to the Backbone Area. */ - list oiflist; /* ospf interfaces */ + struct list *oiflist; /* ospf interfaces */ /* LSDB of AS-external-LSAs. */ struct ospf_lsdb *lsdb; @@ -208,7 +208,7 @@ struct ospf int ase_calc; /* ASE calculation flag. */ #ifdef HAVE_OPAQUE_LSA - list opaque_lsa_self; /* Type-11 Opaque-LSAs */ + struct list *opaque_lsa_self; /* Type-11 Opaque-LSAs */ #endif /* HAVE_OPAQUE_LSA */ /* Routing tables. */ @@ -227,7 +227,7 @@ struct ospf /* Time stamps. */ time_t ts_spf; /* SPF calculation time stamp. */ - list maxage_lsa; /* List of MaxAge LSA for deletion. */ + struct list *maxage_lsa; /* List of MaxAge LSA for deletion. */ int redistribute; /* Num of redistributed protocols. */ /* Threads. */ @@ -248,7 +248,7 @@ struct ospf struct thread *t_write; struct thread *t_read; int fd; - list oi_write_q; + struct list *oi_write_q; /* Distribute lists out of other route sources. */ struct @@ -284,7 +284,7 @@ struct ospf struct { u_int16_t index; - list qs[OSPF_LSA_REFRESHER_SLOTS]; + struct list *qs[OSPF_LSA_REFRESHER_SLOTS]; } lsa_refresh_queue; struct thread *t_lsa_refresher; @@ -314,7 +314,7 @@ struct ospf_area struct ospf *ospf; /* Zebra interface list belonging to the area. */ - list oiflist; + struct list *oiflist; /* Area ID. */ struct in_addr area_id; @@ -325,7 +325,7 @@ struct ospf_area #define OSPF_AREA_ID_FORMAT_DECIMAL 2 /* Address range. */ - list address_range; + struct list *address_range; /* Configured variables. */ int external_routing; /* ExternalRoutingCapability. */ @@ -362,7 +362,7 @@ struct ospf_area /* Self-originated LSAs. */ struct ospf_lsa *router_lsa_self; #ifdef HAVE_OPAQUE_LSA - list opaque_lsa_self; /* Type-10 Opaque-LSAs */ + struct list *opaque_lsa_self; /* Type-10 Opaque-LSAs */ #endif /* HAVE_OPAQUE_LSA */ /* Area announce list. */ -- cgit v1.2.1