X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Fsubnet.c;h=2aab91d19435b8857c4b7f70dc424d9d34cd405c;hb=784db4e70d2573468c82ff5dfee723b77a20322f;hp=ed5e1ac8946a476a13cf9a35646ef5363cd75755;hpb=0b9175e998c2180e5d73ef3d644a49d620c68cad;p=tinc diff --git a/src/subnet.c b/src/subnet.c index ed5e1ac8..2aab91d1 100644 --- a/src/subnet.c +++ b/src/subnet.c @@ -1,7 +1,7 @@ /* subnet.c -- handle subnet lookups and lists - Copyright (C) 2000-2002 Guus Sliepen , - 2000-2002 Ivo Timmermans + Copyright (C) 2000-2003 Guus Sliepen , + 2000-2003 Ivo Timmermans This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.c,v 1.1.2.44 2003/07/06 22:11:33 guus Exp $ + $Id: subnet.c,v 1.1.2.46 2003/07/12 17:41:47 guus Exp $ */ #include "config.h" @@ -48,7 +48,7 @@ avl_tree_t *subnet_tree; /* Subnet comparison */ -int subnet_compare_mac(subnet_t *a, subnet_t *b) +static int subnet_compare_mac(subnet_t *a, subnet_t *b) { int result; @@ -60,7 +60,7 @@ int subnet_compare_mac(subnet_t *a, subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -int subnet_compare_ipv4(subnet_t *a, subnet_t *b) +static int subnet_compare_ipv4(subnet_t *a, subnet_t *b) { int result; @@ -77,7 +77,7 @@ int subnet_compare_ipv4(subnet_t *a, subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -int subnet_compare_ipv6(subnet_t *a, subnet_t *b) +static int subnet_compare_ipv6(subnet_t *a, subnet_t *b) { int result; @@ -94,7 +94,7 @@ int subnet_compare_ipv6(subnet_t *a, subnet_t *b) return strcmp(a->owner->name, b->owner->name); } -int subnet_compare(subnet_t *a, subnet_t *b) +static int subnet_compare(subnet_t *a, subnet_t *b) { int result; @@ -111,7 +111,7 @@ int subnet_compare(subnet_t *a, subnet_t *b) case SUBNET_IPV6: return subnet_compare_ipv6(a, b); default: - logger(DEBUG_ALWAYS, LOG_ERR, _("subnet_compare() was called with unknown subnet type %d, exitting!"), + logger(LOG_ERR, _("subnet_compare() was called with unknown subnet type %d, exitting!"), a->type); cp_trace(); exit(0); @@ -295,7 +295,7 @@ char *net2str(subnet_t *subnet) break; default: - logger(DEBUG_ALWAYS, LOG_ERR, + logger(LOG_ERR, _("net2str() was called with unknown subnet type %d, exiting!"), subnet->type); cp_trace(); @@ -411,14 +411,14 @@ void dump_subnets(void) cp(); - logger(DEBUG_ALWAYS, LOG_DEBUG, _("Subnet list:")); + logger(LOG_DEBUG, _("Subnet list:")); for(node = subnet_tree->head; node; node = node->next) { subnet = (subnet_t *) node->data; netstr = net2str(subnet); - logger(DEBUG_ALWAYS, LOG_DEBUG, _(" %s owner %s"), netstr, subnet->owner->name); + logger(LOG_DEBUG, _(" %s owner %s"), netstr, subnet->owner->name); free(netstr); } - logger(DEBUG_ALWAYS, LOG_DEBUG, _("End of subnet list.")); + logger(LOG_DEBUG, _("End of subnet list.")); }