Browse Source

Remove usage of evil list and listnode typedefs.

hasso 15 years ago
parent
commit
52dc7ee65f
62 changed files with 441 additions and 409 deletions
  1. 4 0
      bgpd/ChangeLog
  2. 1 1
      bgpd/bgp_network.c
  3. 2 2
      bgpd/bgp_nexthop.c
  4. 16 16
      bgpd/bgp_zebra.c
  5. 4 0
      isisd/ChangeLog
  6. 3 3
      isisd/isis_circuit.c
  7. 5 0
      lib/ChangeLog
  8. 15 15
      lib/if.c
  9. 2 2
      lib/if.h
  10. 4 4
      lib/linklist.c
  11. 4 7
      lib/linklist.h
  12. 4 0
      ospf6d/ChangeLog
  13. 5 5
      ospf6d/ospf6_abr.c
  14. 7 7
      ospf6d/ospf6_area.c
  15. 1 1
      ospf6d/ospf6_area.h
  16. 2 2
      ospf6d/ospf6_asbr.c
  17. 7 7
      ospf6d/ospf6_flood.c
  18. 13 13
      ospf6d/ospf6_interface.c
  19. 1 1
      ospf6d/ospf6_interface.h
  20. 4 4
      ospf6d/ospf6_intra.c
  21. 1 1
      ospf6d/ospf6_message.c
  22. 3 3
      ospf6d/ospf6_neighbor.c
  23. 2 2
      ospf6d/ospf6_spf.c
  24. 1 1
      ospf6d/ospf6_spf.h
  25. 6 6
      ospf6d/ospf6_top.c
  26. 1 1
      ospf6d/ospf6_top.h
  27. 16 16
      ospf6d/ospf6d.c
  28. 4 0
      ospfd/ChangeLog
  29. 16 16
      ospfd/ospf_abr.c
  30. 16 16
      ospfd/ospf_ase.c
  31. 6 6
      ospfd/ospf_flood.c
  32. 5 5
      ospfd/ospf_ia.c
  33. 17 17
      ospfd/ospf_interface.c
  34. 7 7
      ospfd/ospf_interface.h
  35. 10 10
      ospfd/ospf_ism.c
  36. 20 20
      ospfd/ospf_lsa.c
  37. 2 2
      ospfd/ospf_neighbor.c
  38. 24 23
      ospfd/ospf_packet.c
  39. 1 1
      ospfd/ospf_packet.h
  40. 14 14
      ospfd/ospf_route.c
  41. 4 4
      ospfd/ospf_route.h
  42. 27 26
      ospfd/ospf_spf.c
  43. 2 2
      ospfd/ospf_spf.h
  44. 24 24
      ospfd/ospf_vty.c
  45. 4 4
      ospfd/ospf_zebra.c
  46. 17 17
      ospfd/ospfd.c
  47. 10 10
      ospfd/ospfd.h
  48. 4 0
      ripd/ChangeLog
  49. 13 13
      ripd/rip_interface.c
  50. 8 8
      ripd/ripd.c
  51. 4 0
      ripngd/ChangeLog
  52. 7 7
      ripngd/ripng_interface.c
  53. 6 6
      ripngd/ripngd.c
  54. 4 0
      zebra/ChangeLog
  55. 2 2
      zebra/connected.c
  56. 8 8
      zebra/interface.c
  57. 2 2
      zebra/interface.h
  58. 1 1
      zebra/irdp.h
  59. 8 8
      zebra/redistribute.c
  60. 6 6
      zebra/rtadv.c
  61. 3 3
      zebra/zserv.c
  62. 1 1
      zebra/zserv.h

+ 4 - 0
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.

+ 1 - 1
bgpd/bgp_network.c

@@ -175,7 +175,7 @@ bgp_update_address (struct interface *ifp)
 {
   struct prefix_ipv4 *p;
   struct connected *connected;
-  listnode node;
+  struct listnode *node;
 
   for (node = listhead (ifp->connected); node; nextnode (node))
     {

+ 2 - 2
bgpd/bgp_nexthop.c

@@ -815,8 +815,8 @@ bgp_connected_delete (struct connected *ifc)
 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;

+ 16 - 16
bgpd/bgp_zebra.c

@@ -45,7 +45,7 @@ int
 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 @@ bgp_if_update (struct interface *ifp)
 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 @@ bgp_interface_up (int command, struct zclient *zclient, zebra_size_t length)
   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 @@ bgp_interface_down (int command, struct zclient *zclient, zebra_size_t length)
   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 @@ zebra_read_ipv6 (int command, struct zclient *zclient, zebra_size_t length)
 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 @@ if_lookup_by_ipv4 (struct in_addr *addr)
 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 @@ if_lookup_by_ipv4_exact (struct in_addr *addr)
 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 @@ if_lookup_by_ipv6 (struct in6_addr *addr)
 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 @@ if_lookup_by_ipv6_exact (struct in6_addr *addr)
 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 @@ if_get_ipv6_global (struct interface *ifp, struct in6_addr *addr)
 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 @@ bgp_nexthop_set (union sockunion *local, union sockunion *remote,
 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;

+ 4 - 0
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.

+ 3 - 3
isisd/isis_circuit.c

@@ -626,9 +626,9 @@ isis_interface_config_write (struct vty *vty)
 {
 
   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;

+ 5 - 0
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

+ 15 - 15
lib/if.c

@@ -179,7 +179,7 @@ if_add_hook (int type, int (*func)(struct interface *ifp))
 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 @@ if_lookup_by_index (unsigned int index)
 char *
 ifindex2ifname (unsigned int index)
 {
-  listnode node;
+  struct listnode *node;
   struct interface *ifp;
 
   for (node = listhead (iflist); node; nextnode (node))
@@ -210,7 +210,7 @@ ifindex2ifname (unsigned int index)
 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 @@ if_lookup_by_name (char *name)
 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 @@ if_lookup_exact_address (struct in_addr src)
 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 @@ if_flag_dump (unsigned long flag)
 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 @@ if_dump (struct interface *ifp)
 void
 if_dump_all ()
 {
-  listnode node;
+  struct listnode *node;
 
   for (node = listhead (iflist); node; nextnode (node))
     if_dump (getdata (node));
@@ -560,8 +560,8 @@ DEFUN (show_address,
        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 @@ connected_lookup_address (struct interface *ifp, struct in_addr dst)
 {
   struct prefix addr;
   struct prefix best;
-  listnode cnode;
+  struct listnode *cnode;
   struct prefix *p;
   struct connected *c;
   struct connected *match;
@@ -760,7 +760,7 @@ connected_add_by_prefix (struct interface *ifp, struct prefix *p,
 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 @@ if_nametoindex (const char *name)
 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 @@ ifaddr_ipv4_lookup (struct in_addr *addr, unsigned int ifindex)
   struct prefix_ipv4 p;
   struct route_node *rn;
   struct interface *ifp;
-  listnode node;
+  struct listnode *node;
 
   if (addr)
     {

+ 2 - 2
lib/if.h

@@ -117,7 +117,7 @@ struct interface
   void *distribute_out;
 
   /* Connected address list. */
-  list connected;
+  struct list *connected;
 
   /* Daemon specific interface data pointer. */
   void *info;
@@ -222,7 +222,7 @@ char *if_indextoname (unsigned int, char *);
 #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;

+ 4 - 4
lib/linklist.c

@@ -244,7 +244,7 @@ list_delete (struct list *list)
 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 @@ listnode_lookup (struct list *list, void *data)
 
 /* 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 @@ list_delete_node (list list, listnode node)
 
 /* 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 @@ list_add_node_prev (list list, listnode current, void *val)
 
 /* 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;
 

+ 4 - 7
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 (struct list *);
 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) \

+ 4 - 0
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

+ 5 - 5
ospf6d/ospf6_abr.c

@@ -52,7 +52,7 @@ unsigned char conf_debug_ospf6_abr;
 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 @@ ospf6_abr_enable_area (struct ospf6_area *area)
 {
   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 @@ ospf6_abr_disable_area (struct ospf6_area *area)
   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 @@ ospf6_abr_range_update (struct ospf6_route *range)
 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 @@ ospf6_abr_examin_brouter (u_int32_t router_id)
 {
   struct ospf6_lsa *lsa;
   struct ospf6_area *oa;
-  listnode node;
+  struct listnode *node;
   u_int16_t type;
 
   type = htons (OSPF6_LSTYPE_INTER_ROUTER);

+ 7 - 7
ospf6d/ospf6_area.c

@@ -175,7 +175,7 @@ ospf6_area_create (u_int32_t area_id, struct ospf6 *o)
 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 @@ struct ospf6_area *
 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 @@ ospf6_area_get (u_int32_t area_id, struct ospf6 *o)
 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 @@ ospf6_area_enable (struct ospf6_area *oa)
 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 @@ ospf6_area_disable (struct ospf6_area *oa)
 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 @@ DEFUN (no_area_range,
 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 @@ DEFUN (show_ipv6_ospf6_spf_tree,
        "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;

+ 1 - 1
ospf6d/ospf6_area.h

@@ -47,7 +47,7 @@ struct ospf6_area
   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;

+ 2 - 2
ospf6d/ospf6_asbr.c

@@ -444,7 +444,7 @@ ospf6_asbr_redistribute_add (int type, int ifindex, struct prefix *prefix,
   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 @@ ospf6_asbr_redistribute_remove (int type, int ifindex, struct prefix *prefix)
   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);

+ 7 - 7
ospf6d/ospf6_flood.c

@@ -245,7 +245,7 @@ void
 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 @@ void
 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 @@ void
 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 @@ ospf6_flood (struct ospf6_neighbor *from, struct ospf6_lsa *lsa)
 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 @@ ospf6_flood_clear_interface (struct ospf6_lsa *lsa, struct ospf6_interface *oi)
 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 @@ ospf6_flood_clear_area (struct ospf6_lsa *lsa, struct ospf6_area *oa)
 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 @@ ospf6_is_maxage_lsa_drop (struct ospf6_lsa *lsa, struct ospf6_neighbor *from)
   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))

+ 13 - 13
ospf6d/ospf6_interface.c

@@ -165,7 +165,7 @@ ospf6_interface_create (struct interface *ifp)
 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 @@ ospf6_interface_enable (struct ospf6_interface *oi)
 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 @@ ospf6_interface_disable (struct ospf6_interface *oi)
 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 @@ ospf6_interface_connected_route_update (struct interface *ifp)
   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 @@ better_drouter (struct ospf6_neighbor *a, struct ospf6_neighbor *b)
 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 @@ int
 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 @@ ospf6_interface_show (struct vty *vty, struct interface *ifp)
   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 @@ DEFUN (show_ipv6_ospf6_interface,
        )
 {
   struct interface *ifp;
-  listnode i;
+  struct listnode *i;
 
   if (argc)
     {
@@ -1002,7 +1002,7 @@ DEFUN (show_ipv6_ospf6_interface_prefix,
        "Display connected prefixes to advertise\n"
        )
 {
-  listnode i;
+  struct listnode *i;
   struct ospf6_interface *oi;
   struct interface *ifp;
 
@@ -1059,7 +1059,7 @@ DEFUN (ipv6_ospf6_ifmtu,
   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 @@ DEFUN (no_ipv6_ospf6_ifmtu,
   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 @@ DEFUN (ipv6_ospf6_passive,
 {
   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 @@ DEFUN (no_ipv6_ospf6_advertise_prefix_list,
 int
 config_write_ospf6_interface (struct vty *vty)
 {
-  listnode i;
+  struct listnode *i;
   struct ospf6_interface *oi;
   struct interface *ifp;
 

+ 1 - 1
ospf6d/ospf6_interface.h

@@ -43,7 +43,7 @@ struct ospf6_interface
   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;

+ 4 - 4
ospf6d/ospf6_intra.c

@@ -109,7 +109,7 @@ ospf6_router_lsa_originate (struct thread *thread)
   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 @@ ospf6_network_lsa_originate (struct thread *thread)
   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 @@ ospf6_intra_prefix_lsa_originate_stub (struct thread *thread)
   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 @@ ospf6_intra_prefix_lsa_originate_transit (struct thread *thread)
   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;

+ 1 - 1
ospf6d/ospf6_message.c

@@ -1387,7 +1387,7 @@ ospf6_hello_send (struct thread *thread)
   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);

+ 3 - 3
ospf6d/ospf6_neighbor.c

@@ -58,7 +58,7 @@ struct ospf6_neighbor *
 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 @@ DEFUN (show_ipv6_ospf6_neighbor,
   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 @@ DEFUN (show_ipv6_ospf6_neighbor_one,
   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;
 

+ 2 - 2
ospf6d/ospf6_spf.c

@@ -281,7 +281,7 @@ ospf6_spf_install (struct ospf6_vertex *v,
   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 @@ void
 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;

+ 1 - 1
ospf6d/ospf6_spf.h

@@ -68,7 +68,7 @@ struct ospf6_vertex
 
   /* For tree display */
   struct ospf6_vertex *parent;
-  list child_list;
+  struct list *child_list;
 };
 
 #define OSPF6_VERTEX_TYPE_ROUTER  0x01

+ 6 - 6
ospf6d/ospf6_top.c

@@ -143,7 +143,7 @@ ospf6_create ()
 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 @@ ospf6_delete (struct ospf6 *o)
 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 @@ ospf6_enable (struct ospf6 *o)
 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 @@ ospf6_maxage_remover (struct thread *thread)
   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 @@ DEFUN (no_ospf6_interface_area,
 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 @@ int
 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;
 

+ 1 - 1
ospf6d/ospf6_top.h

@@ -34,7 +34,7 @@ struct ospf6
   struct timeval starttime;
 
   /* list of areas */
-  list area_list;
+  struct list *area_list;
 
   /* AS scope link state database */
   struct ospf6_lsdb *lsdb;

+ 16 - 16
ospf6d/ospf6d.c

@@ -174,7 +174,7 @@ DEFUN (show_ipv6_ospf6_database,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_id,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_router,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_id,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_router,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_id_router,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_adv_router_linkstate_id,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_id_router,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_adv_router_linkstate_id,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_self_originated,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_self_originated_linkstate_id,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_database_type_id_self_originated,
       )
 {
   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 @@ DEFUN (show_ipv6_ospf6_linkstate,
        "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 @@ DEFUN (show_ipv6_ospf6_linkstate_detail,
 {
   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" */

+ 4 - 0
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

+ 16 - 16
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;

+ 16 - 16
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;

+ 6 - 6
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);

+ 5 - 5
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");

+ 17 - 17
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))

+ 7 - 7
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 */

+ 10 - 10
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. */

+ 20 - 20
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;
 	      

+ 2 - 2
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))
         {

+ 24 - 23
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;

+ 1 - 1
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 *);

+ 14 - 14
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");

+ 4 - 4
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 *, 

+ 27 - 26
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)");

+ 2 - 2
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 */

+ 24 - 24
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 ();

+ 4 - 4
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;