Changeset View
Changeset View
Standalone View
Standalone View
sys/net/bpf.c
Show First 20 Lines • Show All 2,363 Lines • ▼ Show 20 Lines | bpf_mtap2(struct bpf_if *bp, void *data, u_int dlen, struct mbuf *m) | ||||
} | } | ||||
pktlen = m_length(m, NULL); | pktlen = m_length(m, NULL); | ||||
/* | /* | ||||
* Craft on-stack mbuf suitable for passing to bpf_filter. | * Craft on-stack mbuf suitable for passing to bpf_filter. | ||||
* Note that we cut corners here; we only setup what's | * Note that we cut corners here; we only setup what's | ||||
* absolutely needed--this mbuf should never go anywhere else. | * absolutely needed--this mbuf should never go anywhere else. | ||||
*/ | */ | ||||
mb.m_flags = 0; | |||||
mb.m_next = m; | mb.m_next = m; | ||||
mb.m_data = data; | mb.m_data = data; | ||||
mb.m_len = dlen; | mb.m_len = dlen; | ||||
pktlen += dlen; | pktlen += dlen; | ||||
gottime = BPF_TSTAMP_NONE; | gottime = BPF_TSTAMP_NONE; | ||||
NET_EPOCH_ENTER(et); | NET_EPOCH_ENTER(et); | ||||
▲ Show 20 Lines • Show All 706 Lines • Show Last 20 Lines |