+ if (dp->dp_if.if_flags & IFF_OACTIVE) {
+ dpstart(&dp->dp_if);
+ }
+}
+/*
+ * For debugging loopback activity.
+ */
+static char pppheader[4] = { -1, 3, 0, 0x21 };
+int dp_louts;
+
+dptestoutput(ifp, m, dst, rt)
+register struct ifnet *ifp;
+register struct mbuf *m;
+struct sockaddr *dst;
+struct rtentry *rt;
+{
+ /*
+ * Queue message on interface, and start output if interface
+ * not yet active.
+ */
+ int s = splimp(), error = 0;
+ dp_louts++;
+ M_PREPEND(m, sizeof pppheader, M_DONTWAIT);
+ if (m == 0) {
+ splx(s);
+ return ENOBUFS;
+ }
+ bcopy(pppheader, mtod(m, caddr_t), sizeof pppheader);
+ if (IF_QFULL(&ifp->if_snd)) {
+ IF_DROP(&ifp->if_snd);
+ /* printf("%s%d: HDLC says OK to send but queue full, may hang\n",
+ ifp->if_name, ifp->if_unit);*/
+ m_freem(m);
+ error = ENOBUFS;
+ } else {
+ IF_ENQUEUE(&ifp->if_snd, m);
+ if ((ifp->if_flags & IFF_OACTIVE) == 0)
+ (*ifp->if_start)(ifp);