Remove usage of evil list and listnode typedefs.
diff --git a/bgpd/ChangeLog b/bgpd/ChangeLog
index 0aac403..ee0b311 100644
--- a/bgpd/ChangeLog
+++ b/bgpd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-07-09 Paul Jakma <paul@dishone.st>
* Merge of GNU Zebra cvs2svn changesets r799, r800 and r807.
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
index aa369bc..85e12d9 100644
--- a/bgpd/bgp_network.c
+++ b/bgpd/bgp_network.c
@@ -175,7 +175,7 @@
{
struct prefix_ipv4 *p;
struct connected *connected;
- listnode node;
+ struct listnode *node;
for (node = listhead (ifp->connected); node; nextnode (node))
{
diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index e94ecf2..4100e3d 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -815,8 +815,8 @@
int
bgp_nexthop_self (afi_t afi, struct attr *attr)
{
- listnode node;
- listnode node2;
+ struct listnode *node;
+ struct listnode *node2;
struct interface *ifp;
struct connected *ifc;
struct prefix *p;
diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c
index 394bde6..42b8fc7 100644
--- a/bgpd/bgp_zebra.c
+++ b/bgpd/bgp_zebra.c
@@ -45,7 +45,7 @@
bgp_if_update (struct interface *ifp)
{
struct bgp *bgp;
- listnode cn;
+ struct listnode *cn;
struct listnode *nn;
struct listnode *nm;
struct peer *peer;
@@ -86,7 +86,7 @@
int
bgp_if_update_all ()
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; node = nextnode (node))
@@ -128,7 +128,7 @@
struct stream *s;
struct interface *ifp;
struct connected *c;
- listnode node;
+ struct listnode *node;
s = zclient->ibuf;
ifp = zebra_interface_state_read (s);
@@ -151,7 +151,7 @@
struct stream *s;
struct interface *ifp;
struct connected *c;
- listnode node;
+ struct listnode *node;
s = zclient->ibuf;
ifp = zebra_interface_state_read (s);
@@ -348,8 +348,8 @@
struct interface *
if_lookup_by_ipv4 (struct in_addr *addr)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *connected;
struct prefix_ipv4 p;
@@ -379,8 +379,8 @@
struct interface *
if_lookup_by_ipv4_exact (struct in_addr *addr)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *connected;
struct prefix *cp;
@@ -406,8 +406,8 @@
struct interface *
if_lookup_by_ipv6 (struct in6_addr *addr)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *connected;
struct prefix_ipv6 p;
@@ -437,8 +437,8 @@
struct interface *
if_lookup_by_ipv6_exact (struct in6_addr *addr)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *connected;
struct prefix *cp;
@@ -463,7 +463,7 @@
int
if_get_ipv6_global (struct interface *ifp, struct in6_addr *addr)
{
- listnode cnode;
+ struct listnode *cnode;
struct connected *connected;
struct prefix *cp;
@@ -485,7 +485,7 @@
int
if_get_ipv6_local (struct interface *ifp, struct in6_addr *addr)
{
- listnode cnode;
+ struct listnode *cnode;
struct connected *connected;
struct prefix *cp;
@@ -621,8 +621,8 @@
unsigned int
bgp_ifindex_by_nexthop (struct in6_addr *addr)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *connected;
struct prefix_ipv6 p;
diff --git a/isisd/ChangeLog b/isisd/ChangeLog
index 2b49c69..50028a9 100644
--- a/isisd/ChangeLog
+++ b/isisd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-21 LIU Xin <lx at ns.6test.edu.cn>
* isis_dr.c: Update dis_record of adjacencies when isisd becomes DIS.
diff --git a/isisd/isis_circuit.c b/isisd/isis_circuit.c
index 4f66346..21aa59e 100644
--- a/isisd/isis_circuit.c
+++ b/isisd/isis_circuit.c
@@ -626,9 +626,9 @@
{
int write = 0;
- listnode node;
- listnode node2;
- listnode node3;
+ struct listnode *node;
+ struct listnode *node2;
+ struct listnode *node3;
struct interface *ifp;
struct isis_area *area;
struct isis_circuit *c;
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 149403f..7b32578 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * linklist.h: Remove list and listnode typedefs.
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-17 Paul Jakma <paul@dishone.st>
* sockopt.c: Add missing bracket
diff --git a/lib/if.c b/lib/if.c
index d80e234..43e84a4 100644
--- a/lib/if.c
+++ b/lib/if.c
@@ -179,7 +179,7 @@
struct interface *
if_lookup_by_index (unsigned int index)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
@@ -194,7 +194,7 @@
char *
ifindex2ifname (unsigned int index)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
@@ -210,7 +210,7 @@
struct interface *
if_lookup_by_name (char *name)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
@@ -226,8 +226,8 @@
struct interface *
if_lookup_exact_address (struct in_addr src)
{
- listnode node;
- listnode cnode;
+ struct listnode *node;
+ struct listnode *cnode;
struct interface *ifp;
struct prefix *p;
struct connected *c;
@@ -256,10 +256,10 @@
struct interface *
if_lookup_address (struct in_addr src)
{
- listnode node;
+ struct listnode *node;
struct prefix addr;
struct prefix best;
- listnode cnode;
+ struct listnode *cnode;
struct interface *ifp;
struct prefix *p;
struct connected *c;
@@ -429,7 +429,7 @@
void
if_dump (struct interface *ifp)
{
- listnode node;
+ struct listnode *node;
zlog_info ("Interface %s index %d metric %d mtu %d "
#ifdef HAVE_IPV6
@@ -450,7 +450,7 @@
void
if_dump_all ()
{
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
if_dump (getdata (node));
@@ -560,8 +560,8 @@
SHOW_STR
"address\n")
{
- listnode node;
- listnode node2;
+ struct listnode *node;
+ struct listnode *node2;
struct interface *ifp;
struct connected *ifc;
struct prefix *p;
@@ -681,7 +681,7 @@
{
struct prefix addr;
struct prefix best;
- listnode cnode;
+ struct listnode *cnode;
struct prefix *p;
struct connected *c;
struct connected *match;
@@ -760,7 +760,7 @@
unsigned int
if_nametoindex (const char *name)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
@@ -777,7 +777,7 @@
char *
if_indextoname (unsigned int ifindex, char *name)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
@@ -849,7 +849,7 @@
struct prefix_ipv4 p;
struct route_node *rn;
struct interface *ifp;
- listnode node;
+ struct listnode *node;
if (addr)
{
diff --git a/lib/if.h b/lib/if.h
index 70a1286..47e992c 100644
--- a/lib/if.h
+++ b/lib/if.h
@@ -117,7 +117,7 @@
void *distribute_out;
/* Connected address list. */
- list connected;
+ struct list *connected;
/* Daemon specific interface data pointer. */
void *info;
@@ -222,7 +222,7 @@
#endif
/* Exported variables. */
-extern list iflist;
+extern struct list *iflist;
extern struct cmd_element interface_desc_cmd;
extern struct cmd_element no_interface_desc_cmd;
extern struct cmd_element interface_cmd;
diff --git a/lib/linklist.c b/lib/linklist.c
index 1c95da4..3970c24 100644
--- a/lib/linklist.c
+++ b/lib/linklist.c
@@ -244,7 +244,7 @@
struct listnode *
listnode_lookup (struct list *list, void *data)
{
- listnode node;
+ struct listnode *node;
assert(list);
for (node = list->head; node; nextnode (node))
@@ -255,7 +255,7 @@
/* Delete the node from list. For ospfd and ospf6d. */
void
-list_delete_node (list list, listnode node)
+list_delete_node (struct list *list, struct listnode *node)
{
if (node->prev)
node->prev->next = node->next;
@@ -271,7 +271,7 @@
/* ospf_spf.c */
void
-list_add_node_prev (list list, listnode current, void *val)
+list_add_node_prev (struct list *list, struct listnode *current, void *val)
{
struct listnode *node;
@@ -292,7 +292,7 @@
/* ospf_spf.c */
void
-list_add_node_next (list list, listnode current, void *val)
+list_add_node_next (struct list *list, struct listnode *current, void *val)
{
struct listnode *node;
diff --git a/lib/linklist.h b/lib/linklist.h
index 303b0bc..b766420 100644
--- a/lib/linklist.h
+++ b/lib/linklist.h
@@ -22,9 +22,6 @@
#ifndef _ZEBRA_LINKLIST_H
#define _ZEBRA_LINKLIST_H
-typedef struct list *list;
-typedef struct listnode *listnode;
-
struct listnode
{
struct listnode *next;
@@ -68,12 +65,12 @@
void list_delete_all_node (struct list *);
/* For ospfd and ospf6d. */
-void list_delete_node (list, listnode);
+void list_delete_node (struct list *, struct listnode *);
/* For ospf_spf.c */
-void list_add_node_prev (list, listnode, void *);
-void list_add_node_next (list, listnode, void *);
-void list_add_list (list, list);
+void list_add_node_prev (struct list *, struct listnode *, void *);
+void list_add_node_next (struct list *, struct listnode *, void *);
+void list_add_list (struct list *, struct list *);
/* List iteration macro. */
#define LIST_LOOP(L,V,N) \
diff --git a/ospf6d/ChangeLog b/ospf6d/ChangeLog
index 4f64cbc..e7ef97e 100644
--- a/ospf6d/ChangeLog
+++ b/ospf6d/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-13 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospf6_intra.c, ospf6_route.[ch]: try to fix assertion failure
diff --git a/ospf6d/ospf6_abr.c b/ospf6d/ospf6_abr.c
index 503c13f..52fa590 100644
--- a/ospf6d/ospf6_abr.c
+++ b/ospf6d/ospf6_abr.c
@@ -52,7 +52,7 @@
int
ospf6_is_router_abr (struct ospf6 *o)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
int area_count = 0;
@@ -73,7 +73,7 @@
{
struct ospf6_area *oa;
struct ospf6_route *ro;
- listnode node;
+ struct listnode *node;
for (node = listhead (area->ospf6->area_list); node; nextnode (node))
{
@@ -111,7 +111,7 @@
struct ospf6_area *oa;
struct ospf6_route *ro;
struct ospf6_lsa *old;
- listnode node;
+ struct listnode *node;
/* Withdraw all summary prefixes previously originated */
for (ro = ospf6_route_head (area->summary_prefix); ro;
@@ -470,7 +470,7 @@
void
ospf6_abr_originate_summary (struct ospf6_route *route)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
struct ospf6_route *range = NULL;
@@ -656,7 +656,7 @@
{
struct ospf6_lsa *lsa;
struct ospf6_area *oa;
- listnode node;
+ struct listnode *node;
u_int16_t type;
type = htons (OSPF6_LSTYPE_INTER_ROUTER);
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index de28cb9..c9d15b8 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -175,7 +175,7 @@
void
ospf6_area_delete (struct ospf6_area *oa)
{
- listnode n;
+ struct listnode *n;
struct ospf6_interface *oi;
ospf6_route_table_delete (oa->range_table);
@@ -215,7 +215,7 @@
ospf6_area_lookup (u_int32_t area_id, struct ospf6 *ospf6)
{
struct ospf6_area *oa;
- listnode n;
+ struct listnode *n;
for (n = listhead (ospf6->area_list); n; nextnode (n))
{
@@ -240,7 +240,7 @@
void
ospf6_area_enable (struct ospf6_area *oa)
{
- listnode i;
+ struct listnode *i;
struct ospf6_interface *oi;
SET_FLAG (oa->flag, OSPF6_AREA_ENABLE);
@@ -255,7 +255,7 @@
void
ospf6_area_disable (struct ospf6_area *oa)
{
- listnode i;
+ struct listnode *i;
struct ospf6_interface *oi;
UNSET_FLAG (oa->flag, OSPF6_AREA_ENABLE);
@@ -271,7 +271,7 @@
void
ospf6_area_show (struct vty *vty, struct ospf6_area *oa)
{
- listnode i;
+ struct listnode *i;
struct ospf6_interface *oi;
vty_out (vty, " Area %s%s", oa->name, VNL);
@@ -410,7 +410,7 @@
void
ospf6_area_config_write (struct vty *vty)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
struct ospf6_route *range;
char buf[128];
@@ -437,7 +437,7 @@
"Shortest Path First caculation\n"
"Show SPF tree\n")
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
struct ospf6_vertex *root;
struct ospf6_route *route;
diff --git a/ospf6d/ospf6_area.h b/ospf6d/ospf6_area.h
index 734f030..0cee638 100644
--- a/ospf6d/ospf6_area.h
+++ b/ospf6d/ospf6_area.h
@@ -47,7 +47,7 @@
struct ospf6_route_table *summary_router;
/* OSPF interface list */
- list if_list;
+ struct list *if_list;
struct ospf6_lsdb *lsdb;
struct ospf6_lsdb *lsdb_self;
diff --git a/ospf6d/ospf6_asbr.c b/ospf6d/ospf6_asbr.c
index 032e348..a3728f4 100644
--- a/ospf6d/ospf6_asbr.c
+++ b/ospf6d/ospf6_asbr.c
@@ -444,7 +444,7 @@
struct prefix prefix_id;
struct route_node *node;
char pbuf[64], ibuf[16];
- listnode lnode;
+ struct listnode *lnode;
struct ospf6_area *oa;
if (! ospf6_zebra_is_redistribute (type))
@@ -590,7 +590,7 @@
struct ospf6_lsa *lsa;
struct prefix prefix_id;
char pbuf[64], ibuf[16];
- listnode lnode;
+ struct listnode *lnode;
struct ospf6_area *oa;
match = ospf6_route_lookup (prefix, ospf6->external_table);
diff --git a/ospf6d/ospf6_flood.c b/ospf6d/ospf6_flood.c
index e9ba52b..acfe28a 100644
--- a/ospf6d/ospf6_flood.c
+++ b/ospf6d/ospf6_flood.c
@@ -245,7 +245,7 @@
ospf6_flood_interface (struct ospf6_neighbor *from,
struct ospf6_lsa *lsa, struct ospf6_interface *oi)
{
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
struct ospf6_lsa *req;
int retrans_added = 0;
@@ -394,7 +394,7 @@
ospf6_flood_area (struct ospf6_neighbor *from,
struct ospf6_lsa *lsa, struct ospf6_area *oa)
{
- listnode node;
+ struct listnode *node;
struct ospf6_interface *oi;
for (node = listhead (oa->if_list); node; nextnode (node))
@@ -419,7 +419,7 @@
ospf6_flood_process (struct ospf6_neighbor *from,
struct ospf6_lsa *lsa, struct ospf6 *process)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
for (node = listhead (process->area_list); node; nextnode (node))
@@ -450,7 +450,7 @@
void
ospf6_flood_clear_interface (struct ospf6_lsa *lsa, struct ospf6_interface *oi)
{
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
struct ospf6_lsa *rem;
@@ -474,7 +474,7 @@
void
ospf6_flood_clear_area (struct ospf6_lsa *lsa, struct ospf6_area *oa)
{
- listnode node;
+ struct listnode *node;
struct ospf6_interface *oi;
for (node = listhead (oa->if_list); node; nextnode (node))
@@ -498,7 +498,7 @@
void
ospf6_flood_clear_process (struct ospf6_lsa *lsa, struct ospf6 *process)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
for (node = listhead (process->area_list); node; nextnode (node))
@@ -714,7 +714,7 @@
struct ospf6_interface *oi;
struct ospf6_area *oa;
struct ospf6 *process = NULL;
- listnode i, j, k;
+ struct listnode *i, *j, *k;
int count = 0;
if (! OSPF6_LSA_IS_MAXAGE (lsa))
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index a8ea1d3..85f908e 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -165,7 +165,7 @@
void
ospf6_interface_delete (struct ospf6_interface *oi)
{
- listnode n;
+ struct listnode *n;
struct ospf6_neighbor *on;
for (n = listhead (oi->neighbor_list); n; nextnode (n))
@@ -213,7 +213,7 @@
void
ospf6_interface_disable (struct ospf6_interface *oi)
{
- listnode i;
+ struct listnode *i;
struct ospf6_neighbor *on;
SET_FLAG (oi->flag, OSPF6_INTERFACE_DISABLE);
@@ -237,7 +237,7 @@
static struct in6_addr *
ospf6_interface_get_linklocal_address (struct interface *ifp)
{
- listnode n;
+ struct listnode *n;
struct connected *c;
struct in6_addr *l = (struct in6_addr *) NULL;
@@ -332,7 +332,7 @@
struct ospf6_interface *oi;
struct ospf6_route *route;
struct connected *c;
- listnode i;
+ struct listnode *i;
oi = (struct ospf6_interface *) ifp->info;
if (oi == NULL)
@@ -512,7 +512,7 @@
static u_char
dr_election (struct ospf6_interface *oi)
{
- listnode i;
+ struct listnode *i;
struct ospf6_neighbor *on, *drouter, *bdrouter, myself;
struct ospf6_neighbor *best_drouter, *best_bdrouter;
u_char next_state = 0;
@@ -738,7 +738,7 @@
interface_down (struct thread *thread)
{
struct ospf6_interface *oi;
- listnode n;
+ struct listnode *n;
struct ospf6_neighbor *on;
oi = (struct ospf6_interface *) THREAD_ARG (thread);
@@ -772,7 +772,7 @@
struct ospf6_interface *oi;
struct connected *c;
struct prefix *p;
- listnode i;
+ struct listnode *i;
char strbuf[64], drouter[32], bdrouter[32];
char *updown[3] = {"down", "up", NULL};
char *type;
@@ -895,7 +895,7 @@
)
{
struct interface *ifp;
- listnode i;
+ struct listnode *i;
if (argc)
{
@@ -1002,7 +1002,7 @@
"Display connected prefixes to advertise\n"
)
{
- listnode i;
+ struct listnode *i;
struct ospf6_interface *oi;
struct interface *ifp;
@@ -1059,7 +1059,7 @@
struct ospf6_interface *oi;
struct interface *ifp;
int ifmtu, iobuflen;
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
ifp = (struct interface *) vty->index;
@@ -1120,7 +1120,7 @@
struct ospf6_interface *oi;
struct interface *ifp;
int iobuflen;
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
ifp = (struct interface *) vty->index;
@@ -1360,7 +1360,7 @@
{
struct ospf6_interface *oi;
struct interface *ifp;
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
ifp = (struct interface *) vty->index;
@@ -1491,7 +1491,7 @@
int
config_write_ospf6_interface (struct vty *vty)
{
- listnode i;
+ struct listnode *i;
struct ospf6_interface *oi;
struct interface *ifp;
diff --git a/ospf6d/ospf6_interface.h b/ospf6d/ospf6_interface.h
index be3007d..d28b310 100644
--- a/ospf6d/ospf6_interface.h
+++ b/ospf6d/ospf6_interface.h
@@ -43,7 +43,7 @@
struct ospf6_area *area;
/* list of ospf6 neighbor */
- list neighbor_list;
+ struct list *neighbor_list;
/* linklocal address of this I/F */
struct in6_addr *linklocal_addr;
diff --git a/ospf6d/ospf6_intra.c b/ospf6d/ospf6_intra.c
index 4452e62..fd208fd 100644
--- a/ospf6d/ospf6_intra.c
+++ b/ospf6d/ospf6_intra.c
@@ -109,7 +109,7 @@
struct ospf6_lsa *lsa;
u_int32_t link_state_id = 0;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6_interface *oi;
struct ospf6_neighbor *on, *drouter = NULL;
struct ospf6_router_lsa *router_lsa;
@@ -354,7 +354,7 @@
struct ospf6_network_lsdesc *lsdesc;
struct ospf6_neighbor *on;
struct ospf6_link_lsa *link_lsa;
- listnode i;
+ struct listnode *i;
u_int16_t type;
oi = (struct ospf6_interface *) THREAD_ARG (thread);
@@ -687,7 +687,7 @@
struct ospf6_neighbor *on;
struct ospf6_route *route;
struct ospf6_prefix *op;
- listnode i, j;
+ struct listnode *i, *j;
int full_count = 0;
unsigned short prefix_num = 0;
char buf[BUFSIZ];
@@ -839,7 +839,7 @@
struct ospf6_neighbor *on;
struct ospf6_route *route;
struct ospf6_prefix *op;
- listnode i;
+ struct listnode *i;
int full_count = 0;
unsigned short prefix_num = 0;
struct ospf6_route_table *route_advertise;
diff --git a/ospf6d/ospf6_message.c b/ospf6d/ospf6_message.c
index ae699b9..d4a60dd 100644
--- a/ospf6d/ospf6_message.c
+++ b/ospf6d/ospf6_message.c
@@ -1387,7 +1387,7 @@
struct ospf6_header *oh;
struct ospf6_hello *hello;
char *p;
- listnode node;
+ struct listnode *node;
struct ospf6_neighbor *on;
oi = (struct ospf6_interface *) THREAD_ARG (thread);
diff --git a/ospf6d/ospf6_neighbor.c b/ospf6d/ospf6_neighbor.c
index ad4261f..752b3fc 100644
--- a/ospf6d/ospf6_neighbor.c
+++ b/ospf6d/ospf6_neighbor.c
@@ -58,7 +58,7 @@
ospf6_neighbor_lookup (u_int32_t router_id,
struct ospf6_interface *oi)
{
- listnode n;
+ struct listnode *n;
struct ospf6_neighbor *on;
for (n = listhead (oi->neighbor_list); n; nextnode (n))
@@ -772,7 +772,7 @@
struct ospf6_neighbor *on;
struct ospf6_interface *oi;
struct ospf6_area *oa;
- listnode i, j, k;
+ struct listnode *i, *j, *k;
void (*showfunc) (struct vty *, struct ospf6_neighbor *);
OSPF6_CMD_CHECK_RUNNING ();
@@ -835,7 +835,7 @@
struct ospf6_neighbor *on;
struct ospf6_interface *oi;
struct ospf6_area *oa;
- listnode i, j, k;
+ struct listnode *i, *j, *k;
void (*showfunc) (struct vty *, struct ospf6_neighbor *);
u_int32_t router_id;
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index 6d4237a..79539b2 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -281,7 +281,7 @@
struct ospf6_route *route;
int i, j;
struct ospf6_vertex *prev, *w;
- listnode node;
+ struct listnode *node;
if (IS_OSPF6_DEBUG_SPF (PROCESS))
zlog_info ("SPF install %s hops %d cost %d",
@@ -530,7 +530,7 @@
ospf6_spf_display_subtree (struct vty *vty, char *prefix, int rest,
struct ospf6_vertex *v)
{
- listnode node;
+ struct listnode *node;
struct ospf6_vertex *c;
char *next_prefix;
int len;
diff --git a/ospf6d/ospf6_spf.h b/ospf6d/ospf6_spf.h
index 64f5ed8..6a6424e 100644
--- a/ospf6d/ospf6_spf.h
+++ b/ospf6d/ospf6_spf.h
@@ -68,7 +68,7 @@
/* For tree display */
struct ospf6_vertex *parent;
- list child_list;
+ struct list *child_list;
};
#define OSPF6_VERTEX_TYPE_ROUTER 0x01
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index cc4356c..712b337 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -143,7 +143,7 @@
void
ospf6_delete (struct ospf6 *o)
{
- listnode i;
+ struct listnode *i;
struct ospf6_area *oa;
for (i = listhead (o->area_list); i; nextnode (i))
@@ -167,7 +167,7 @@
void
ospf6_enable (struct ospf6 *o)
{
- listnode i;
+ struct listnode *i;
struct ospf6_area *oa;
if (CHECK_FLAG (o->flag, OSPF6_DISABLED))
@@ -184,7 +184,7 @@
void
ospf6_disable (struct ospf6 *o)
{
- listnode i;
+ struct listnode *i;
struct ospf6_area *oa;
if (! CHECK_FLAG (o->flag, OSPF6_DISABLED))
@@ -209,7 +209,7 @@
struct ospf6_area *oa;
struct ospf6_interface *oi;
struct ospf6_neighbor *on;
- listnode i, j, k;
+ struct listnode *i, *j, *k;
o->maxage_remover = (struct thread *) NULL;
@@ -437,7 +437,7 @@
void
ospf6_show (struct vty *vty, struct ospf6 *o)
{
- listnode n;
+ struct listnode *n;
struct ospf6_area *oa;
char router_id[16], duration[32];
struct timeval now, running;
@@ -608,7 +608,7 @@
config_write_ospf6 (struct vty *vty)
{
char router_id[16];
- listnode j, k;
+ struct listnode *j, *k;
struct ospf6_area *oa;
struct ospf6_interface *oi;
diff --git a/ospf6d/ospf6_top.h b/ospf6d/ospf6_top.h
index d831d94..9fd0395 100644
--- a/ospf6d/ospf6_top.h
+++ b/ospf6d/ospf6_top.h
@@ -34,7 +34,7 @@
struct timeval starttime;
/* list of areas */
- list area_list;
+ struct list *area_list;
/* AS scope link state database */
struct ospf6_lsdb *lsdb;
diff --git a/ospf6d/ospf6d.c b/ospf6d/ospf6d.c
index 4a722e4..e94a036 100644
--- a/ospf6d/ospf6d.c
+++ b/ospf6d/ospf6d.c
@@ -174,7 +174,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -242,7 +242,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -330,7 +330,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -429,7 +429,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -538,7 +538,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -697,7 +697,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -847,7 +847,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -933,7 +933,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1029,7 +1029,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1154,7 +1154,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1266,7 +1266,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1339,7 +1339,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1444,7 +1444,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1560,7 +1560,7 @@
)
{
int level;
- listnode i, j;
+ struct listnode *i, *j;
struct ospf6 *o = ospf6;
struct ospf6_area *oa;
struct ospf6_interface *oi;
@@ -1723,7 +1723,7 @@
"Display linkstate routing table\n"
)
{
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
for (node = listhead (ospf6->area_list); node; nextnode (node))
@@ -1773,7 +1773,7 @@
{
char *sargv[CMD_ARGC_MAX];
int i, sargc;
- listnode node;
+ struct listnode *node;
struct ospf6_area *oa;
/* copy argv to sargv and then append "detail" */
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 461519f..3a0b134 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-12 Paul Jakma <paul@dishone.st>
* ospf_packet.c: Fix bugzilla #107
diff --git a/ospfd/ospf_abr.c b/ospfd/ospf_abr.c
index 21bd673..9f3a587 100644
--- a/ospfd/ospf_abr.c
+++ b/ospfd/ospf_abr.c
@@ -174,7 +174,7 @@
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 @@
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 @@
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 c7b343c..43951e9 100644
--- a/ospfd/ospf_ase.c
+++ b/ospfd/ospf_ase.c
@@ -54,8 +54,8 @@
{
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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 @@
{
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 @@
{
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 @@
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 b706279..c1d2131 100644
--- a/ospfd/ospf_flood.c
+++ b/ospfd/ospf_flood.c
@@ -116,7 +116,7 @@
{
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 @@
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 @@
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 @@
{
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 @@
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 @@
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 bea2657..ff47f4f 100644
--- a/ospfd/ospf_ia.c
+++ b/ospfd/ospf_ia.c
@@ -55,14 +55,14 @@
{
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 @@
if (IS_OSPF_ABR (ospf))
{
- listnode node;
+ struct listnode *node;
struct ospf_area *area;
switch (ospf->abr_type)
@@ -622,7 +622,7 @@
if ((area = ospf->backbone))
{
- listnode node;
+ struct listnode *node;
if (IS_DEBUG_OSPF_EVENT)
{
@@ -707,7 +707,7 @@
}
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 f7e200c..277d508 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -239,7 +239,7 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 @@
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 @@
}
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 @@
}
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 6f54618..cdab122 100644
--- a/ospfd/ospf_interface.h
+++ b/ospfd/ospf_interface.h
@@ -58,7 +58,7 @@
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 @@
#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 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 @@
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 5f4d546..7fa8b46 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 @@
}
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 @@
}
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 @@
}
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 @@
{
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 60c7aad..34d71b6 100644
--- a/ospfd/ospf_lsa.c
+++ b/ospfd/ospf_lsa.c
@@ -364,7 +364,7 @@
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 @@
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 @@
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 @@
{
struct in_addr fwd;
struct prefix nh;
- listnode n1;
+ struct listnode *n1;
fwd.s_addr = 0;
@@ -1444,7 +1444,7 @@
{
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 @@
{
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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 6f2d4a0..511b292 100644
--- a/ospfd/ospf_neighbor.c
+++ b/ospfd/ospf_neighbor.c
@@ -294,7 +294,7 @@
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 @@
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 a41627f..c4ecb79 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 @@
/* 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 @@
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 @@
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 @@
/* 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 @@
u_int32_t length;
struct lsa_header *lsah;
struct ospf_lsa *lsa;
- list lsas;
+ struct list *lsas;
lsas = list_new ();
@@ -1536,9 +1536,9 @@
/* 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 @@
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 @@
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 @@
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 @@
}
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 @@
}
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 @@
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 @@
}
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 @@
}
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 @@
}
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 a439aa3..48f4e13 100644
--- a/ospfd/ospf_packet.h
+++ b/ospfd/ospf_packet.h
@@ -153,7 +153,7 @@
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 9f3efb1..9280767 100644
--- a/ospfd/ospf_route.c
+++ b/ospfd/ospf_route.c
@@ -136,8 +136,8 @@
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 @@
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 @@
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 @@
ospf_terminate ()
{
struct ospf *ospf;
- listnode node;
+ struct listnode *node;
LIST_LOOP (om->ospf, ospf, node)
{
@@ -786,7 +786,7 @@
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 @@
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 @@
}
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 @@
}
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 @@
}
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 @@
{
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 802aac6..8aee559 100644
--- a/ospfd/ospf_route.h
+++ b/ospfd/ospf_route.h
@@ -108,7 +108,7 @@
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_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 @@
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_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 5288531..0fd39fa 100644
--- a/ospfd/ospf_spf.c
+++ b/ospfd/ospf_spf.c
@@ -101,7 +101,7 @@
void
ospf_vertex_free (struct vertex *v)
{
- listnode node;
+ struct listnode *node;
list_delete (v->child);
@@ -131,7 +131,7 @@
if (print_nexthops)
{
- listnode nnode;
+ struct listnode *nnode;
for (nnode = listhead (v->nexthop); nnode; nextnode (nnode))
{
char buf1[BUFSIZ];
@@ -154,7 +154,7 @@
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 @@
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 @@
/* 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 @@
* 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 @@
/* 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 @@
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 @@
/* 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 @@
*/
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
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 928d98b..25b1d79 100644
--- a/ospfd/ospf_spf.h
+++ b/ospfd/ospf_spf.h
@@ -38,8 +38,8 @@
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 461574a..6b0dabb 100644
--- a/ospfd/ospf_vty.c
+++ b/ospfd/ospf_vty.c
@@ -2279,7 +2279,7 @@
{
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 @@
"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 @@
IP_STR
"OSPF information\n")
{
- listnode node;
+ struct listnode *node;
struct ospf_area * area;
struct ospf *ospf;
@@ -2625,7 +2625,7 @@
{
struct interface *ifp;
struct ospf *ospf;
- listnode node;
+ struct listnode *node;
ospf = ospf_lookup ();
@@ -2687,7 +2687,7 @@
"Neighbor list\n")
{
struct ospf *ospf;
- listnode node;
+ struct listnode *node;
ospf = ospf_lookup ();
if (ospf == NULL)
@@ -2717,7 +2717,7 @@
"include down status neighbor\n")
{
struct ospf *ospf = vty->index;
- listnode node;
+ struct listnode *node;
if (ospf == NULL)
{
@@ -2733,7 +2733,7 @@
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 @@
"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 @@
"detail of all neighbors\n")
{
struct ospf *ospf;
- listnode node;
+ struct listnode *node;
ospf = ospf_lookup ();
if (ospf == NULL)
@@ -2981,7 +2981,7 @@
"include down status neighbor\n")
{
struct ospf *ospf;
- listnode node;
+ struct listnode *node;
ospf = ospf_lookup ();
if (ospf == NULL)
@@ -3004,7 +3004,7 @@
if (oi->type == OSPF_IFTYPE_NBMA)
{
- listnode nd;
+ struct listnode *nd;
for (nd = listhead (oi->nbr_nbma); nd; nextnode (nd))
{
@@ -3530,7 +3530,7 @@
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 @@
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 @@
{
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 @@
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 @@
{
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 @@
{
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 @@
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 @@
{
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 @@
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 @@
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 @@
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 @@
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 e42373c..5520c08 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -315,7 +315,7 @@
int psize;
struct stream *s;
struct ospf_path *path;
- listnode node;
+ struct listnode *node;
if (zclient->redist[ZEBRA_ROUTE_OSPF])
{
@@ -403,7 +403,7 @@
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 @@
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 @@
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 04b34fb..bfde503 100644
--- a/ospfd/ospfd.c
+++ b/ospfd/ospfd.c
@@ -70,9 +70,9 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
/* 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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
{
#if 0
struct ospf_nbr_nbma *nbr_nbma;
- listnode node;
+ struct listnode *node;
#endif
if (ospf == NULL)
@@ -1513,7 +1513,7 @@
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 988f438..6910d39 100644
--- a/ospfd/ospfd.h
+++ b/ospfd/ospfd.h
@@ -193,12 +193,12 @@
#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 @@
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 @@
/* 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 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
{
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 *ospf;
/* Zebra interface list belonging to the area. */
- list oiflist;
+ struct list *oiflist;
/* Area ID. */
struct in_addr area_id;
@@ -325,7 +325,7 @@
#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 @@
/* 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. */
diff --git a/ripd/ChangeLog b/ripd/ChangeLog
index 1921b78..1b018ee 100644
--- a/ripd/ChangeLog
+++ b/ripd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-17 Paul Jakma <paul@dishone.st>
* ripd.c: set receive buffer to a decent size, some systems have low
diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c
index cb6044e..7869f2e 100644
--- a/ripd/rip_interface.c
+++ b/ripd/rip_interface.c
@@ -222,7 +222,7 @@
/* RIPv1 and non multicast interface. */
if (if_is_pointopoint (ifp) || if_is_broadcast (ifp))
{
- listnode cnode;
+ struct listnode *cnode;
if (IS_RIP_DEBUG_EVENT)
zlog_info ("broadcast request to %s", ifp->name);
@@ -315,7 +315,7 @@
int
rip_multicast_join (struct interface *ifp, int sock)
{
- listnode cnode;
+ struct listnode *cnode;
if (if_is_operative (ifp) && if_is_multicast (ifp))
{
@@ -348,7 +348,7 @@
void
rip_multicast_leave (struct interface *ifp, int sock)
{
- listnode cnode;
+ struct listnode *cnode;
if (if_is_up (ifp) && if_is_multicast (ifp))
{
@@ -405,11 +405,11 @@
int
if_check_address (struct in_addr addr)
{
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
- listnode cnode;
+ struct listnode *cnode;
struct interface *ifp;
ifp = getdata (node);
@@ -436,13 +436,13 @@
int
if_valid_neighbor (struct in_addr addr)
{
- listnode node;
+ struct listnode *node;
struct connected *connected = NULL;
struct prefix_ipv4 *p;
for (node = listhead (iflist); node; nextnode (node))
{
- listnode cnode;
+ struct listnode *cnode;
struct interface *ifp;
ifp = getdata (node);
@@ -609,7 +609,7 @@
void
rip_interface_clean ()
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct rip_interface *ri;
@@ -633,7 +633,7 @@
void
rip_interface_reset ()
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct rip_interface *ri;
@@ -744,7 +744,7 @@
rip_if_down_all ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -1173,7 +1173,7 @@
rip_enable_apply_all ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
/* Check each interface. */
for (node = listhead (iflist); node; nextnode (node))
@@ -1298,7 +1298,7 @@
rip_passive_interface_apply_all ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -2022,7 +2022,7 @@
int
rip_interface_config_write (struct vty *vty)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
for (node = listhead (iflist); node; nextnode (node))
diff --git a/ripd/ripd.c b/ripd/ripd.c
index 5fbb349..6b79a16 100644
--- a/ripd/ripd.c
+++ b/ripd/ripd.c
@@ -357,8 +357,8 @@
static int
rip_nexthop_check (struct in_addr *addr)
{
- listnode node;
- listnode cnode;
+ struct listnode *node;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *ifc;
struct prefix *p;
@@ -2391,7 +2391,7 @@
{
struct prefix_ipv4 *p;
struct connected *connected;
- listnode node;
+ struct listnode *node;
struct sockaddr_in to;
struct prefix_ipv4 *saddr = (struct prefix_ipv4 *) sconn->address;
@@ -2440,7 +2440,7 @@
void
rip_update_process (int route_type)
{
- listnode node, ifnode;
+ struct listnode *node, *ifnode;
struct connected *connected;
struct interface *ifp;
struct rip_interface *ri;
@@ -2710,7 +2710,7 @@
{
struct rte *rte;
struct rip_packet rip_packet;
- listnode node;
+ struct listnode *node;
memset (&rip_packet, 0, sizeof (rip_packet));
@@ -3485,7 +3485,7 @@
"Show RIP routes\n"
"IP routing protocol process parameters and statistics\n")
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct rip_interface *ri;
extern struct message ri_version_msg[];
@@ -3755,7 +3755,7 @@
rip_distribute_update_all (struct prefix_list *notused)
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -3949,7 +3949,7 @@
rip_routemap_update (char *notused)
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
diff --git a/ripngd/ChangeLog b/ripngd/ChangeLog
index 64ee7d8..92dbf6f 100644
--- a/ripngd/ChangeLog
+++ b/ripngd/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-17 Paul Jakma <paul@dishone.st>
* ripngd.c: move setsockopt_so_recvbuf to lib.
diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c
index 92067a7..126829f 100644
--- a/ripngd/ripng_interface.c
+++ b/ripngd/ripng_interface.c
@@ -158,7 +158,7 @@
int
ripng_check_max_mtu ()
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
int mtu;
@@ -335,7 +335,7 @@
void
ripng_interface_clean ()
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct ripng_interface *ri;
@@ -358,7 +358,7 @@
void
ripng_interface_reset () {
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct ripng_interface *ri;
@@ -531,7 +531,7 @@
int
ripng_enable_network_lookup_if (struct interface *ifp)
{
- listnode listnode;
+ struct listnode *listnode;
struct connected *connected;
struct prefix_ipv6 address;
@@ -823,7 +823,7 @@
ripng_enable_apply_all ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -891,7 +891,7 @@
ripng_passive_interface_apply_all (void)
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -1162,7 +1162,7 @@
int
interface_config_write (struct vty *vty)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct ripng_interface *ri;
int write = 0;
diff --git a/ripngd/ripngd.c b/ripngd/ripngd.c
index 77e4754..874848c 100644
--- a/ripngd/ripngd.c
+++ b/ripngd/ripngd.c
@@ -391,7 +391,7 @@
int
ripng_lladdr_check (struct interface *ifp, struct in6_addr *addr)
{
- listnode listnode;
+ struct listnode *listnode;
struct connected *connected;
struct prefix *p;
@@ -1438,7 +1438,7 @@
int
ripng_update (struct thread *t)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct ripng_interface *ri;
@@ -1513,7 +1513,7 @@
int
ripng_triggered_update (struct thread *t)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct ripng_interface *ri;
int interval;
@@ -2146,7 +2146,7 @@
"Show RIPng routes\n"
"IPv6 routing protocol process parameters and statistics\n")
{
- listnode node;
+ struct listnode *node;
int ripng_network_write (struct vty *, int);
void ripng_redistribute_write (struct vty *, int);
@@ -2816,7 +2816,7 @@
ripng_distribute_update_all ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
@@ -2988,7 +2988,7 @@
ripng_routemap_update ()
{
struct interface *ifp;
- listnode node;
+ struct listnode *node;
for (node = listhead (iflist); node; nextnode (node))
{
diff --git a/zebra/ChangeLog b/zebra/ChangeLog
index 275537f..38bca6b 100644
--- a/zebra/ChangeLog
+++ b/zebra/ChangeLog
@@ -1,3 +1,7 @@
+2004-09-23 Hasso Tepper <hasso at quagga.net>
+
+ * *.[c|h]: list -> struct list *, listnode -> struct listnode *.
+
2004-09-22 Paul Jakma <paul.jakma@sun.com>
* zserv.c: (zsend_route_multipath) fix nasty bad memset of struct
diff --git a/zebra/connected.c b/zebra/connected.c
index 7fa5ea7..21af3e9 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -38,7 +38,7 @@
connected_check_ipv4 (struct interface *ifp, struct prefix *p)
{
struct connected *ifc;
- listnode node;
+ struct listnode *node;
for (node = listhead (ifp->connected); node; node = nextnode (node))
{
@@ -221,7 +221,7 @@
connected_check_ipv6 (struct interface *ifp, struct prefix *p)
{
struct connected *ifc;
- listnode node;
+ struct listnode *node;
for (node = listhead (ifp->connected); node; node = nextnode (node))
{
diff --git a/zebra/interface.c b/zebra/interface.c
index bf84a69..5c26e26 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -275,8 +275,8 @@
void
if_up (struct interface *ifp)
{
- listnode node;
- listnode next;
+ struct listnode *node;
+ struct listnode *next;
struct connected *ifc;
struct prefix *p;
@@ -310,8 +310,8 @@
void
if_down (struct interface *ifp)
{
- listnode node;
- listnode next;
+ struct listnode *node;
+ struct listnode *next;
struct connected *ifc;
struct prefix *p;
@@ -490,7 +490,7 @@
struct sockaddr_dl *sdl;
#endif /* HAVE_SOCKADDR_DL */
struct connected *connected;
- listnode node;
+ struct listnode *node;
vty_out (vty, "Interface %s is ", ifp->name);
if (if_is_up(ifp)) {
@@ -706,7 +706,7 @@
"Interface status and configuration\n"
"Inteface name\n")
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
#ifdef HAVE_PROC_NET_DEV
@@ -1355,14 +1355,14 @@
int
if_config_write (struct vty *vty)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
char buf[BUFSIZ];
for (node = listhead (iflist); node; nextnode (node))
{
struct zebra_if *if_data;
- listnode addrnode;
+ struct listnode *addrnode;
struct connected *ifc;
struct prefix *p;
diff --git a/zebra/interface.h b/zebra/interface.h
index 88049b4..b38a922 100644
--- a/zebra/interface.h
+++ b/zebra/interface.h
@@ -139,7 +139,7 @@
protocols as being on-link for the interface from which the
advertisement is sent. The link-local prefix SHOULD NOT be
included in the list of advertised prefixes. */
- list AdvPrefixList;
+ struct list *AdvPrefixList;
};
#endif /* RTADV */
@@ -157,7 +157,7 @@
u_char rtadv_enable;
/* Interface's address. */
- list address;
+ struct list *address;
#ifdef RTADV
struct rtadvconf rtadv;
diff --git a/zebra/irdp.h b/zebra/irdp.h
index 2bf17f0..88453e9 100644
--- a/zebra/irdp.h
+++ b/zebra/irdp.h
@@ -132,7 +132,7 @@
unsigned long irdp_sent;
u_int16_t Lifetime;
- list AdvPrefList;
+ struct list *AdvPrefList;
};
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index a4335c1..6dd3bd2 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -168,7 +168,7 @@
void
redistribute_add (struct prefix *p, struct rib *rib)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
for (node = listhead (zebrad.client_list); node; nextnode (node))
@@ -201,7 +201,7 @@
void
redistribute_delete (struct prefix *p, struct rib *rib)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
/* Add DISTANCE_INFINITY check. */
@@ -305,7 +305,7 @@
void
zebra_interface_up_update (struct interface *ifp)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
@@ -320,7 +320,7 @@
void
zebra_interface_down_update (struct interface *ifp)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
@@ -335,7 +335,7 @@
void
zebra_interface_add_update (struct interface *ifp)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
@@ -356,7 +356,7 @@
void
zebra_interface_delete_update (struct interface *ifp)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
if (IS_ZEBRA_DEBUG_EVENT)
@@ -374,7 +374,7 @@
zebra_interface_address_add_update (struct interface *ifp,
struct connected *ifc)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
struct prefix *p;
char buf[BUFSIZ];
@@ -398,7 +398,7 @@
zebra_interface_address_delete_update (struct interface *ifp,
struct connected *ifc)
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
struct prefix *p;
char buf[BUFSIZ];
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 7ded4c8..4bab03b 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -164,7 +164,7 @@
int len = 0;
struct zebra_if *zif;
u_char all_nodes_addr[] = {0xff,0x02,0,0,0,0,0,0,0,0,0,0,0,0,0,1};
- listnode node;
+ struct listnode *node;
/*
* Allocate control message bufffer. This is dynamic because
@@ -308,7 +308,7 @@
int
rtadv_timer (struct thread *thread)
{
- listnode node;
+ struct listnode *node;
struct interface *ifp;
struct zebra_if *zif;
@@ -505,9 +505,9 @@
}
struct rtadv_prefix *
-rtadv_prefix_lookup (list rplist, struct prefix *p)
+rtadv_prefix_lookup (struct list *rplist, struct prefix *p)
{
- listnode node;
+ struct listnode *node;
struct rtadv_prefix *rprefix;
for (node = listhead (rplist); node; node = nextnode (node))
@@ -520,7 +520,7 @@
}
struct rtadv_prefix *
-rtadv_prefix_get (list rplist, struct prefix *p)
+rtadv_prefix_get (struct list *rplist, struct prefix *p)
{
struct rtadv_prefix *rprefix;
@@ -1070,7 +1070,7 @@
rtadv_config_write (struct vty *vty, struct interface *ifp)
{
struct zebra_if *zif;
- listnode node;
+ struct listnode *node;
struct rtadv_prefix *rprefix;
u_char buf[INET6_ADDRSTRLEN];
diff --git a/zebra/zserv.c b/zebra/zserv.c
index 96d6f53..f57fe5c 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -726,8 +726,8 @@
static void
zread_interface_add (struct zserv *client, u_short length)
{
- listnode ifnode;
- listnode cnode;
+ struct listnode *ifnode;
+ struct listnode *cnode;
struct interface *ifp;
struct connected *c;
@@ -1540,7 +1540,7 @@
"Zebra information"
"Client information")
{
- listnode node;
+ struct listnode *node;
struct zserv *client;
for (node = listhead (zebrad.client_list); node; nextnode (node))
diff --git a/zebra/zserv.h b/zebra/zserv.h
index 90e85f6..ac5da1b 100644
--- a/zebra/zserv.h
+++ b/zebra/zserv.h
@@ -63,7 +63,7 @@
{
/* Thread master */
struct thread_master *master;
- list client_list;
+ struct list *client_list;
/* default table */
int rtm_table_default;