+ *mprev = m_free(mh);
+}
+
+/*
+ * Remove a packet from the holding q.
+ * The RFNM counter is also bumped.
+ */
+struct mbuf *
+hostdeque(hp)
+ register struct host *hp;
+{
+ register struct mbuf *m;
+
+ hp->h_rfnm--;
+ HOST_DEQUE(hp, m);
+ if (m)
+ return (m);
+ if (hp->h_rfnm == 0)
+ hostfree(hp);
+ return (0);
+}
+
+/*
+ * Host data base timer routine.
+ * Decrement timers on structures which are
+ * waiting to be deallocated. On expiration
+ * release resources, possibly deallocating
+ * mbuf associated with structure.
+ */
+hostslowtimo()
+{
+ register struct mbuf *m;
+ register struct host *hp, *lp;
+ struct hmbuf *hm;
+ struct mbuf *mnext;
+ int s = splimp();
+
+ for (m = hosts; m; m = mnext) {
+ mnext = m->m_next;
+ hm = mtod(m, struct hmbuf *);
+ hp = hm->hm_hosts;
+ lp = hp + HPMBUF;
+ for (; hm->hm_count > 0 && hp < lp; hp++) {
+ if (hp->h_timer && --hp->h_timer == 0) {
+ if (hp->h_rfnm)
+ log(LOG_WARNING,
+ "imp?: host %x, lost %d rfnms\n",
+ ntohl(hp->h_addr.s_addr), hp->h_rfnm);
+ hostrelease(hp);
+ }
+ }
+ }
+ splx(s);