void pdq_os_receive_pdu( pdq_t *pdq, struct mbuf *m, size_t pktlen) { pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx; struct fddi_header *fh = mtod(m, struct fddi_header *); sc->sc_if.if_ipackets++; #if NBPFILTER > 0 if (sc->sc_bpf != NULL) PDQ_BPF_MTAP(sc, m, BPF_DIRECTION_IN); if ((fh->fddi_fc & (FDDIFC_L|FDDIFC_F)) != FDDIFC_LLC_ASYNC) { m_freem(m); return; } #endif m->m_data += sizeof(struct fddi_header); m->m_len -= sizeof(struct fddi_header); m->m_pkthdr.len = pktlen - sizeof(struct fddi_header); m->m_pkthdr.rcvif = &sc->sc_if; fddi_input(&sc->sc_if, fh, m); }
void pdq_os_transmit_done( pdq_t *pdq, struct mbuf *m) { pdq_softc_t *sc = pdq->pdq_os_ctx; #if defined(NBPFILTER) && NBPFILTER > 0 if (PQD_IFNET(sc)->if_bpf != NULL) PDQ_BPF_MTAP(sc, m); #endif PDQ_OS_DATABUF_FREE(pdq, m); PDQ_IFNET(sc)->if_opackets++; }
void pdq_os_transmit_done( pdq_t *pdq, struct mbuf *m) { pdq_softc_t *sc = (pdq_softc_t *) pdq->pdq_os_ctx; #if NBPFILTER > 0 if (sc->sc_bpf != NULL) PDQ_BPF_MTAP(sc, m, BPF_DIRECTION_OUT); #endif m_freem(m); sc->sc_if.if_opackets++; }