Lines Matching refs:m

191 lo_demux(struct ifnet *ifp, struct mbuf *m, char *frame_header,  in lo_demux()  argument
194 #pragma unused(ifp, m) in lo_demux()
204 lo_framer(struct ifnet *ifp, struct mbuf **m, const struct sockaddr *dest, in lo_framer() argument
211 M_PREPEND(*m, sizeof(struct loopback_header), M_WAITOK, 1); in lo_framer()
212 if (*m == NULL) { in lo_framer()
224 header = mtod(*m, struct loopback_header *); in lo_framer()
245 lo_tx_compl(struct ifnet *ifp, struct mbuf *m) in lo_tx_compl() argument
252 error = mbuf_get_timestamp_requested(m, &requested); in lo_tx_compl()
260 error = mbuf_set_timestamp(m, ts, TRUE); in lo_tx_compl()
267 error = mbuf_set_status(m, KERN_SUCCESS); in lo_tx_compl()
273 ifnet_tx_compl(ifp, m); in lo_tx_compl()
284 struct mbuf *m, *m_tail = NULL; in lo_output() local
290 for (m = m_list; m; m = m->m_nextpkt) { in lo_output()
291 VERIFY(m->m_flags & M_PKTHDR); in lo_output()
299 if (m->m_pkthdr.rcvif == NULL) { in lo_output()
300 m->m_pkthdr.rcvif = ifp; in lo_output()
303 m->m_pkthdr.pkt_flags |= PKTF_LOOP; in lo_output()
304 m->m_pkthdr.pkt_hdr = mtod(m, char *); in lo_output()
307 m->m_pkthdr.csum_data = 0xffff; in lo_output()
308 m->m_pkthdr.csum_flags = in lo_output()
312 m_adj(m, sizeof(struct loopback_header)); in lo_output()
313 len += m->m_pkthdr.len; in lo_output()
315 LO_BPF_TAP_OUT(m); in lo_output()
316 if (m->m_nextpkt == NULL) { in lo_output()
317 m_tail = m; in lo_output()
319 lo_tx_compl(ifp, m); in lo_output()
338 struct mbuf *m = m0, *n; in lo_pre_enqueue() local
341 while (m != NULL) { in lo_pre_enqueue()
342 VERIFY(m->m_flags & M_PKTHDR); in lo_pre_enqueue()
344 n = m->m_nextpkt; in lo_pre_enqueue()
345 m->m_nextpkt = NULL; in lo_pre_enqueue()
352 if (m->m_pkthdr.rcvif == NULL) { in lo_pre_enqueue()
353 m->m_pkthdr.rcvif = ifp; in lo_pre_enqueue()
356 m->m_pkthdr.pkt_flags |= PKTF_LOOP; in lo_pre_enqueue()
357 m->m_pkthdr.pkt_hdr = mtod(m, char *); in lo_pre_enqueue()
360 m->m_pkthdr.csum_data = 0xffff; in lo_pre_enqueue()
361 m->m_pkthdr.csum_flags = in lo_pre_enqueue()
365 m_adj(m, sizeof(struct loopback_header)); in lo_pre_enqueue()
371 (void) ifnet_enqueue(ifp, m); in lo_pre_enqueue()
373 m = n; in lo_pre_enqueue()
397 mbuf_ref_t m = NULL, m_tail = NULL; in lo_start() local
401 if (ifnet_dequeue_multi(ifp, lo_dequeue_max, &m, in lo_start()
407 lo_dequeue_sc, lo_dequeue_max, &m, in lo_start()
413 LO_BPF_TAP_OUT_MULTI(m); in lo_start()
414 lo_tx_compl(ifp, m); in lo_start()
422 (void) ifnet_input_extended(ifp, m, m_tail, &s); in lo_start()
432 struct mbuf **m, const struct sockaddr *dst, void *route, char *frame_type, in lo_pre_output() argument
438 VERIFY((*m)->m_flags & M_PKTHDR); in lo_pre_output()
440 (*m)->m_flags |= M_LOOP; in lo_pre_output()
446 m_freem(*m); in lo_pre_output()
465 lo_input(struct ifnet *ifp, protocol_family_t protocol_family, struct mbuf *m) in lo_input() argument
477 error = mbuf_set_timestamp(m, ts, TRUE); in lo_input()
484 if (proto_input(protocol_family, m) != 0) { in lo_input()
485 m_freem(m); in lo_input()