- register struct mbuf *m;
- struct raw_header *rh;
- int s;
-
- /*
- * Rip off an mbuf for a generic header.
- */
- m = m_get(M_DONTWAIT);
- if (m == 0) {
- m_freem(m0);
- return;
- }
- m->m_next = m0;
- m->m_off = MMINOFF;
- m->m_len = sizeof(struct raw_header);
- rh = mtod(m, struct raw_header *);
- rh->raw_dst = *dst;
- rh->raw_src = *src;
- rh->raw_proto = *proto;
-
- /*
- * Header now contains enough info to decide
- * which socket to place packet in (if any).
- * Queue it up for the raw protocol process
- * running at software interrupt level.
- */
- s = splimp();
- if (IF_QFULL(&rawintrq))
- m_freem(m);
- else
- IF_ENQUEUE(&rawintrq, m);
- splx(s);
- schednetisr(NETISR_RAW);
-}
-
-/*
- * Raw protocol input routine. Process packets entered
- * into the queue at interrupt time. Find the socket
- * associated with the packet(s) and move them over. If
- * nothing exists for this packet, drop it.
- */
-rawintr()
-{
- int s;
- struct mbuf *m;