From 765667f17616f3b60816a8fac0a4be441ab970c6 Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 7 Apr 2007 21:07:21 +0000 Subject: [PATCH] Remove the hostcache code which has been inactive since 1998. --- sys/conf/files | 4 +- sys/net/hostcache.c | 252 ------------------------------------- sys/net/hostcache.h | 103 --------------- sys/netinet/in_hostcache.c | 158 ----------------------- sys/netinet/in_hostcache.h | 90 ------------- 5 files changed, 1 insertion(+), 606 deletions(-) delete mode 100644 sys/net/hostcache.c delete mode 100644 sys/net/hostcache.h delete mode 100644 sys/netinet/in_hostcache.c delete mode 100644 sys/netinet/in_hostcache.h diff --git a/sys/conf/files b/sys/conf/files index 3f149ebbf6..030e54c597 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/conf/files,v 1.340.2.137 2003/06/04 17:10:30 sam Exp $ -# $DragonFly: src/sys/conf/files,v 1.154 2007/04/02 14:25:38 sephe Exp $ +# $DragonFly: src/sys/conf/files,v 1.155 2007/04/07 21:07:21 swildner Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -686,7 +686,6 @@ net/bpf_filter.c optional bpf net/bridge/if_bridge.c optional bridge net/bridge/bridgestp.c optional bridge net/bsd_comp.c optional ppp_bsdcomp -#net/hostcache.c standard net/if.c standard net/if_arcsubr.c optional arcnet net/if_atmsubr.c optional atm @@ -884,7 +883,6 @@ netinet/in_gif.c optional gif inet netinet/igmp.c optional inet netinet/in.c optional inet netinet/in_cksum.c optional inet -#netinet/in_hostcache.c optional inet netinet/ip_gre.c optional gre inet netinet/ip_id.c optional inet netinet/in_pcb.c optional inet diff --git a/sys/net/hostcache.c b/sys/net/hostcache.c deleted file mode 100644 index e0c29c8ce2..0000000000 --- a/sys/net/hostcache.c +++ /dev/null @@ -1,252 +0,0 @@ -/* - * Copyright 1997 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby - * granted, provided that both the above copyright notice and this - * permission notice appear in all copies, that both the above - * copyright notice and this permission notice appear in all - * supporting documentation, and that the name of M.I.T. not be used - * in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. M.I.T. makes - * no representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS - * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT - * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/net/hostcache.c,v 1.6.2.1 2002/04/14 21:41:48 luigi Exp $ - * $DragonFly: src/sys/net/Attic/hostcache.c,v 1.9 2006/12/22 23:44:54 swildner Exp $ - */ - -#include -#include -#include -#include -#include -#include - -#include -#include - -MALLOC_DEFINE(M_HOSTCACHE, "hostcache", "per-host cache structure"); - -static struct hctable hctable[AF_MAX]; -static int hc_timeout_interval = 120; -static int hc_maxidle = 1800; -static struct callout hc_timeout_h; - -static int cmpsa(const struct sockaddr *sa1, const struct sockaddr *sa2); -static void hc_timeout(void *xhct); -static void maybe_bump_hash(struct hctable *hct); - -int -hc_init(int af, struct hccallback *hccb, int init_nelem, int primes) -{ - struct hctable *hct; - struct hchead *heads; - u_long nelem; - - hct = &hctable[af]; - nelem = init_nelem; - if (hct->hct_nentries) - return 0; - - if (primes) { - heads = phashinit(init_nelem, M_HOSTCACHE, &nelem); - } else { - int i; - MALLOC(heads, struct hchead *, nelem * sizeof *heads, - M_HOSTCACHE, M_WAITOK); - for (i = 0; i < nelem; i++) { - LIST_INIT(&heads[i]); - } - } - - hct->hct_heads = heads; - hct->hct_nentries = nelem; - hct->hct_primes = primes; - callout_init(&hc_timeout_h); - callout_reset(&hc_timeout_h, hc_timeout_interval * hz, hc_timeout, hct); - return 0; -} - -struct hcentry * -hc_get(struct sockaddr *sa) -{ - u_long hash; - struct hcentry *hc; - struct hctable *hct; - - hct = &hctable[sa->sa_family]; - if (hct->hct_nentries == 0) - return 0; - hash = hct->hct_cb->hccb_hash(sa, hct->hct_nentries); - hc = hct->hct_heads[hash].lh_first; - for (; hc; hc = hc->hc_link.le_next) { - if (cmpsa(hc->hc_host, sa) == 0) - break; - } - if (hc == NULL) - return NULL; - crit_enter(); - if (hc->hc_rt && !(hc->hc_rt->rt_flags & RTF_UP)) { - RTFREE(hc->hc_rt); - hc->hc_rt = NULL; - } - if (hc->hc_rt == NULL) { - hc->hc_rt = rtlookup(hc->hc_host); - } - hc_ref(hc); - crit_exit(); - /* XXX move to front of list? */ - return hc; -} - -void -hc_ref(struct hcentry *hc) -{ - crit_enter(); - if (hc->hc_refcnt++ == 0) { - hc->hc_hct->hct_idle--; - hc->hc_hct->hct_active++; - } - crit_exit(); -} - -void -hc_rele(struct hcentry *hc) -{ - crit_enter(); -#ifdef DIAGNOSTIC - kprintf("hc_rele: %p: negative refcnt!\n", (void *)hc); -#endif - hc->hc_refcnt--; - if (hc->hc_refcnt == 0) { - hc->hc_hct->hct_idle++; - hc->hc_hct->hct_active--; - hc->hc_idlesince = mono_time; /* XXX right one? */ - } - crit_exit(); -} - -/* - * The user is expected to initialize hc_host with the address and everything - * else to the appropriate form of `0'. - */ -int -hc_insert(struct hcentry *hc) -{ - struct hcentry *hc2; - struct hctable *hct; - u_long hash; - - hct = &hctable[hc->hc_host->sa_family]; - hash = hct->hct_cb->hccb_hash(hc->hc_host, hct->hct_nentries); - - hc2 = hct->hct_heads[hash].lh_first; - for (; hc2; hc2 = hc2->hc_link.le_next) { - if (cmpsa(hc2->hc_host, hc->hc_host) == 0) - break; - } - if (hc2 != NULL) - return EEXIST; - hc->hc_hct = hct; - crit_enter(); - LIST_INSERT_HEAD(&hct->hct_heads[hash], hc, hc_link); - hct->hct_idle++; - /* - * If the table is now more than 75% full, consider bumping it. - */ - if (100 * (hct->hct_idle + hct->hct_active) > 75 * hct->hct_nentries) - maybe_bump_hash(hct); - crit_exit(); - return 0; -} - -/* - * It's not clear to me how much sense this makes as an external interface, - * since it is expected that the deletion will normally be handled by - * the cache timeout. - */ -int -hc_delete(struct hcentry *hc) -{ - struct hctable *hct; - int error; - - if (hc->hc_refcnt > 0) - return 0; - - hct = hc->hc_hct; - error = hct->hct_cb->hccb_delete(hc); - if (error) - return 0; - - crit_enter(); - LIST_REMOVE(hc, hc_link); - hc->hc_hct->hct_idle--; - crit_exit(); - kfree(hc, M_HOSTCACHE); - return 0; -} - -static void -hc_timeout(void *xhct) -{ - struct hcentry *hc; - struct hctable *hct; - int j; - time_t start; - - hct = xhct; - start = mono_time.tv_sec; /* for simplicity */ - - if (hct->hct_idle == 0) - return; - for (j = 0; j < hct->hct_nentries; j++) { - for (hc = hct->hct_heads[j].lh_first; hc; - hc = hc->hc_link.le_next) { - if (hc->hc_refcnt > 0) - continue; - if (hc->hc_idlesince.tv_sec + hc_maxidle <= start) { - if (hct->hct_cb->hccb_delete(hc)) - continue; - crit_enter(); - LIST_REMOVE(hc, hc_link); - hct->hct_idle--; - crit_exit(); - } - } - } - /* - * Fiddle something here based on tot_idle... - */ - callout_reset(&hc_timeout_h, hc_timeout_interval * hz, - hc_timeout, xhct); -} - -static int -cmpsa(const struct sockaddr *sa1, const struct sockaddr *sa2) -{ - if (sa1->sa_len != sa2->sa_len) - return ((int)sa1->sa_len - sa2->sa_len); - return bcmp(sa1, sa2, sa1->sa_len); -} - -static void -maybe_bump_hash(struct hctable *hct) -{ - ; /* XXX fill me in */ -} diff --git a/sys/net/hostcache.h b/sys/net/hostcache.h deleted file mode 100644 index 9d9d67d693..0000000000 --- a/sys/net/hostcache.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright 1997 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby - * granted, provided that both the above copyright notice and this - * permission notice appear in all copies, that both the above - * copyright notice and this permission notice appear in all - * supporting documentation, and that the name of M.I.T. not be used - * in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. M.I.T. makes - * no representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS - * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT - * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/net/hostcache.h,v 1.4 1999/12/29 04:38:32 peter Exp $ - * $DragonFly: src/sys/net/Attic/hostcache.h,v 1.4 2006/05/20 02:42:08 dillon Exp $ - */ - -#ifndef _NET_HOSTCACHE_H_ -#define _NET_HOSTCACHE_H_ - -#ifndef _SYS_TYPES_H_ -#include -#endif -#ifndef _SYS_TIME_H_ -#include -#endif - -/* - * This file defines the interface between network protocols and - * the cache of host-specific information maintained by the kernel. - * The generic interface takes care of inserting and deleting entries, - * maintaining mutual exclusion, and enforcing policy constraint on the - * size of the cache and the maximum age of its entries. - * It replaces an earlier scheme which overloaded the routing table - * for this purpose, and should be significantly more efficient - * at performing most operations. (It does keep a route to each - * entry in the cache.) Most protocols will want to define a - * structure which begins with `struct hcentry' so that they - * can keep additional, protocol-specific information in it. - */ - -#include - -struct hcentry { - LIST_ENTRY(hcentry) hc_link; - struct timeval hc_idlesince; /* time last ref dropped */ - struct sockaddr *hc_host; /* address of this entry's host */ - struct rtentry *hc_rt; /* route to get there */ - /* struct nexthop *hc_nh; */ - int hc_refcnt; /* reference count */ - struct hctable *hc_hct; /* back ref to table */ -}; - -struct hccallback { - u_long (*hccb_hash)(struct sockaddr *, u_long); - int (*hccb_delete)(struct hcentry *); - u_long (*hccb_bump)(u_long); -}; - -LIST_HEAD(hchead, hcentry); - -struct hctable { - u_long hct_nentries; - u_long hct_active; - u_long hct_idle; - struct hchead *hct_heads; - struct hccallback *hct_cb; - int hct_primes; -}; - -#ifdef _KERNEL - -#ifdef MALLOC_DECLARE -MALLOC_DECLARE(M_HOSTCACHE); -#endif -/* - * The table-modification functions must be called from user mode, as - * they may block waiting for memory and/or locks. - */ -int hc_init(int af, struct hccallback *hccb, int init_nelem, int primes); -struct hcentry *hc_get(struct sockaddr *sa); -void hc_ref(struct hcentry *hc); -void hc_rele(struct hcentry *hc); -int hc_insert(struct hcentry *hc); -int hc_delete(struct hcentry *hc); -#endif - -#endif /* _NET_HOSTCACHE_H_ */ diff --git a/sys/netinet/in_hostcache.c b/sys/netinet/in_hostcache.c deleted file mode 100644 index f91b034756..0000000000 --- a/sys/netinet/in_hostcache.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright 1997 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby - * granted, provided that both the above copyright notice and this - * permission notice appear in all copies, that both the above - * copyright notice and this permission notice appear in all - * supporting documentation, and that the name of M.I.T. not be used - * in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. M.I.T. makes - * no representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS - * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT - * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/netinet/in_hostcache.c,v 1.3 1999/08/28 00:49:16 peter Exp $ - * $DragonFly: src/sys/netinet/Attic/in_hostcache.c,v 1.6 2005/03/04 03:48:25 hsu Exp $ - */ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -/* - * Manage the IP per-host cache (really a thin veneer over the generic - * per-host cache code). - */ - -/* Look up an entry -- can be called from interrupt context. */ -struct in_hcentry * -inhc_lookup(struct sockaddr_in *sin) -{ - struct hcentry *hc; - - hc = hc_get((struct sockaddr *)sin); - return ((struct in_hcentry *)hc); -} - -/* Look up and possibly create an entry -- must be called from user mode. */ -struct in_hcentry * -inhc_alloc(struct sockaddr_in *sin) -{ - struct in_hcentry *inhc; - struct rtentry *rt; - int error; - /* xxx mutual exclusion for smp */ - - inhc = inhc_lookup(sin); - if (inhc != 0) - return inhc; - - rt = rtlookup(inhc->inhc_hc.hc_host); - if (rt == NULL) - return 0; - - MALLOC(inhc, struct in_hcentry *, sizeof *inhc, M_HOSTCACHE, M_WAITOK); - bzero(inhc, sizeof *inhc); - inhc->inhc_hc.hc_host = dup_sockaddr((struct sockaddr *)sin); - if (in_broadcast(sin->sin_addr, rt->rt_ifp)) - inhc->inhc_flags |= INHC_BROADCAST; - else if (((struct sockaddr_in *)rt->rt_ifa->ifa_addr)->sin_addr.s_addr - == sin->sin_addr.s_addr) - inhc->inhc_flags |= INHC_LOCAL; - else if (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))) - inhc->inhc_flags |= INHC_MULTICAST; - inhc->inhc_pmtu = rt->rt_rmx.rmx_mtu; - inhc->inhc_recvpipe = rt->rt_rmx.rmx_recvpipe; - inhc->inhc_sendpipe = rt->rt_rmx.rmx_sendpipe; - inhc->inhc_ssthresh = rt->rt_rmx.rmx_ssthresh; - if (rt->rt_rmx.rmx_locks & RTV_RTT) - inhc->inhc_rttmin = rt->rt_rmx.rmx_rtt - / (RTM_RTTUNIT / TCP_RTT_SCALE); - inhc->inhc_hc.hc_rt = rt; - error = hc_insert(&inhc->inhc_hc); - if (error != 0) { - RTFREE(rt); - FREE(inhc, M_HOSTCACHE); - return 0; - } - /* - * We don't return the structure directly because hc_get() needs - * to be allowed to do its own processing. - */ - return (inhc_lookup(sin)); -} - -/* - * This is Van Jacobson's hash function for IPv4 addresses. - * It is designed to work with a power-of-two-sized hash table. - */ -static u_long -inhc_hash(struct sockaddr *sa, u_long nbuckets) -{ - u_long ip; - - ip = ((struct sockaddr_in *)sa)->sin_addr.s_addr; - return ((ip ^ (ip >> 23) ^ (ip >> 17)) & ~(nbuckets - 1)); -} - -/* - * We don't need to do any special work... if there are no references, - * as the caller has already ensured, then it's OK to kill. - */ -static int -inhc_delete(struct hcentry *hc) -{ - return 0; -} - -/* - * Return the next increment for the number of buckets in the hash table. - * Zero means ``do not bump''. - */ -static u_long -inhc_bump(u_long oldsize) -{ - if (oldsize < 512) - return (oldsize << 1); - return 0; -} - -static struct hccallback inhc_cb = { - inhc_hash, inhc_delete, inhc_bump -}; - -int -inhc_init(void) -{ - - return (hc_init(AF_INET, &inhc_cb, 128, 0)); -} - diff --git a/sys/netinet/in_hostcache.h b/sys/netinet/in_hostcache.h deleted file mode 100644 index c10890dba7..0000000000 --- a/sys/netinet/in_hostcache.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright 1997 Massachusetts Institute of Technology - * - * Permission to use, copy, modify, and distribute this software and - * its documentation for any purpose and without fee is hereby - * granted, provided that both the above copyright notice and this - * permission notice appear in all copies, that both the above - * copyright notice and this permission notice appear in all - * supporting documentation, and that the name of M.I.T. not be used - * in advertising or publicity pertaining to distribution of the - * software without specific, written prior permission. M.I.T. makes - * no representations about the suitability of this software for any - * purpose. It is provided "as is" without express or implied - * warranty. - * - * THIS SOFTWARE IS PROVIDED BY M.I.T. ``AS IS''. M.I.T. DISCLAIMS - * ALL EXPRESS OR IMPLIED WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT - * SHALL M.I.T. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD: src/sys/netinet/in_hostcache.h,v 1.3 1999/12/29 04:40:59 peter Exp $ - * $DragonFly: src/sys/netinet/Attic/in_hostcache.h,v 1.4 2006/05/20 02:42:12 dillon Exp $ - */ - -#ifndef _NETINET_IN_HOSTCACHE_H -#define _NETINET_IN_HOSTCACHE_H - -#ifndef _NET_HOSTCACHE_H_ -#include -#endif - -/* - * This file defines the particular structures contained in the host cache - * for the use of IP. - */ - -/* - * An IP host cache entry. Note that we include the srtt/var here, - * with the expectation that it might be used to keep a persistent, - * cross-connection view of this statistic. - */ -struct in_hcentry { - struct hcentry inhc_hc; - u_long inhc_pmtu; - u_long inhc_recvpipe; - u_long inhc_sendpipe; - u_long inhc_pksent; - u_long inhc_flags; - u_long inhc_ssthresh; - int inhc_srtt; /* VJ RTT estimator */ - int inhc_srttvar; /* VJ */ - u_int inhc_rttmin; /* VJ */ - int inhc_rxt; /* TCP retransmit timeout */ - u_long inhc_cc; /* deliberate type pun with tcp_cc */ - u_long inhc_ccsent; /* as above */ - u_short inhc_mssopt; -}; - -struct sockaddr_in; - -#define inhc_addr(inhc) ((struct sockaddr_in *)(inhc)->inhc_hc.hc_host) - -/* Flags for inhc_flags... */ -#define INHC_LOCAL 0x0001 /* this address is local */ -#define INHC_BROADCAST 0x0002 /* this address is broadcast */ -#define INHC_MULTICAST 0x0004 /* this address is multicast */ -#define INHC_REDUCEDMTU 0x0008 /* we reduced the mtu via PMTU discovery */ - -#ifdef _KERNEL -/* - * inhc_alloc can block while adding a new entry to the cache; - * inhc_lookup will does not add new entries and so can be called - * in non-process context. - */ -struct in_hcentry *inhc_alloc(struct sockaddr_in *sin); -int inhc_init(void); -struct in_hcentry *inhc_lookup(struct sockaddr_in *sin); -#define inhc_ref(inhc) (hc_ref(&(inhc)->inhc_hc)) -#define inhc_rele(inhc) (hc_rele(&(inhc)->inhc_hc)) -#endif - -#endif /* _NETINET_IN_HOSTCACHE_H */ -- 2.41.0