along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: connlist.c,v 1.1.2.4 2000/10/15 00:59:34 guus Exp $
+ $Id: connlist.c,v 1.1.2.9 2000/10/28 16:41:37 guus Exp $
*/
#include <syslog.h>
free(p->name);
if(p->hostname)
free(p->hostname);
- if(p->public_key)
- RSA_free(p->public_key);
+ if(p->rsa_key)
+ RSA_free(p->rsa_key);
if(p->cipher_pktkey)
free(p->cipher_pktkey);
if(p->buffer)
cp
cl->next = conn_list;
cl->prev = NULL;
- cl->next->prev = cl;
+ if(cl->next)
+ cl->next->prev = cl;
conn_list = cl;
cp
}
conn_list_t *p;
cp
for(p = conn_list; p != NULL; p = p->next)
- if(strcmp(name, p->name) == 0)
- break;
-cp
- return p;
-}
-
-conn_list_t *lookup_conn_list_mac(mac_t address)
-{
- conn_list_t *p;
-cp
- for(p = conn_list; p != NULL; p = p->next)
- if(lookup_subnet_mac(p->subnets, address))
- break;
-cp
- return p;
-}
-
-conn_list_t *lookup_conn_list_ipv4(ipv4_t address)
-{
- conn_list_t *p;
-cp
- for(p = conn_list; p != NULL; p = p->next)
- if(lookup_subnet_ipv4(p->subnets, address))
- break;
-cp
- return p;
-}
-
-conn_list_t *lookup_conn_list_ipv6(ipv6_t address)
-{
- conn_list_t *p;
-cp
- for(p = conn_list; p != NULL; p = p->next)
- if(lookup_subnet_ipv6(p->subnets, address))
- break;
+ if(p->status.active)
+ if(strcmp(name, p->name) == 0)
+ break;
cp
return p;
}
cp
syslog(LOG_DEBUG, _("Connection list:"));
+ syslog(LOG_DEBUG, _("%s at %s port %hd flags %d sockets %d, %d status %04x"),
+ myself->name, myself->hostname, myself->port, myself->flags,
+ myself->socket, myself->meta_socket, myself->status);
+
+ for(s = myself->subnets; s != NULL; s = s->next)
+ {
+ netstr = net2str(s);
+ syslog(LOG_DEBUG, ": %s", netstr);
+ free(netstr);
+ }
+
for(p = conn_list; p != NULL; p = p->next)
{
syslog(LOG_DEBUG, _("%s at %s port %hd flags %d sockets %d, %d status %04x"),
p->name, p->hostname, p->port, p->flags,
p->socket, p->meta_socket, p->status);
+
for(s = p->subnets; s != NULL; s = s->next)
{
netstr = net2str(s);