* Add a client_walk() function to walk the client list. This
authorhartwick <hartwick>
Wed, 8 Nov 2000 04:21:09 +0000 (04:21 +0000)
committerhartwick <hartwick>
Wed, 8 Nov 2000 04:21:09 +0000 (04:21 +0000)
  function is primarily for debugging.

src/main/client.c

index 48bd7bf..8a82d94 100644 (file)
@@ -150,6 +150,19 @@ RADCLIENT *client_find(uint32_t ipaddr)
        return cl;
 }
 
+/*
+ *     Walk the RADCLIENT list displaying the clients.  This function
+ *     is for debugging purposes.
+ */
+void client_walk(void) 
+{
+       RADCLIENT       *cl;
+       char            host_ipaddr[16];
+
+       for(cl = clients; cl; cl = cl->next)
+               radlog(L_ERR, "client: client_walk: %s\n",
+                       ip_ntoa(host_ipaddr, cl->ipaddr));
+}
 
 /*
  *     Find the name of a client (prefer short name).