+nfsrv_initcache(void)
+{
+ if (nfsrv_reqcache_size <= 0)
+ return;
+
+ lck_mtx_lock(nfsrv_reqcache_mutex);
+ /* init nfs server request cache hash table */
+ nfsrv_reqcache_hashtbl = hashinit(nfsrv_reqcache_size, M_NFSD, &nfsrv_reqcache_hash);
+ TAILQ_INIT(&nfsrv_reqcache_lruhead);
+ lck_mtx_unlock(nfsrv_reqcache_mutex);
+}
+
+/*
+ * This function compares two net addresses by family and returns TRUE
+ * if they are the same host.
+ * If there is any doubt, return FALSE.
+ * The AF_INET family is handled as a special case so that address mbufs
+ * don't need to be saved to store "struct in_addr", which is only 4 bytes.
+ */
+static int
+netaddr_match(
+ int family,
+ union nethostaddr *haddr,
+ mbuf_t nam)