+int ifqmaxlen = IFQ_MAXLEN;
+
+/*
+ * Network interface utility routines.
+ *
+ * Routines with if_ifwith* names take sockaddr *'s as
+ * parameters. Other routines take value parameters,
+ * e.g. if_ifwithnet takes the network number.
+ */
+
+ifinit()
+{
+ register struct ifnet *ifp;
+
+ for (ifp = ifnet; ifp; ifp = ifp->if_next)
+ if (ifp->if_init) {
+ (*ifp->if_init)(ifp->if_unit);
+ if (ifp->if_snd.ifq_maxlen == 0)
+ ifp->if_snd.ifq_maxlen = ifqmaxlen;
+ }
+}
+
+/*
+ * Call each interface on a Unibus reset.
+ */
+ifubareset(uban)
+ int uban;
+{
+ register struct ifnet *ifp;
+
+ for (ifp = ifnet; ifp; ifp = ifp->if_next)
+ if (ifp->if_ubareset)
+ (*ifp->if_ubareset)(uban);
+}
+
+/*
+ * Attach an interface to the
+ * list of "active" interfaces.
+ */
+if_attach(ifp)
+ struct ifnet *ifp;
+{
+ register struct ifnet **p = &ifnet;
+
+COUNT(IF_ATTACH);
+ while (*p)
+ p = &((*p)->if_next);
+ *p = ifp;
+}
+
+/*
+ * Locate an interface based on a complete address.
+ */