Changeset View
Changeset View
Standalone View
Standalone View
sys/netgraph/ng_bpf.c
Show First 20 Lines • Show All 466 Lines • ▼ Show 20 Lines | |||||
#ifdef BPF_JITTER | #ifdef BPF_JITTER | ||||
if (usejit) | if (usejit) | ||||
len = (*(hip->jit_prog->func))(data, totlen, totlen); | len = (*(hip->jit_prog->func))(data, totlen, totlen); | ||||
else | else | ||||
#endif | #endif | ||||
if (data) | if (data) | ||||
len = bpf_filter(hip->prog->bpf_prog, data, totlen, totlen); | len = bpf_filter(hip->prog->bpf_prog, data, totlen, totlen); | ||||
else | else | ||||
len = bpf_filter(hip->prog->bpf_prog, (u_char *)m, totlen, 0); | len = bpf_mfilter(hip->prog->bpf_prog, m, totlen); | ||||
if (needfree) | if (needfree) | ||||
free(data, M_NETGRAPH_BPF); | free(data, M_NETGRAPH_BPF); | ||||
ready: | ready: | ||||
/* See if we got a match and find destination hook */ | /* See if we got a match and find destination hook */ | ||||
if (len > 0) { | if (len > 0) { | ||||
/* Update stats */ | /* Update stats */ | ||||
/* XXX atomically? */ | /* XXX atomically? */ | ||||
hip->stats.recvMatchFrames++; | hip->stats.recvMatchFrames++; | ||||
▲ Show 20 Lines • Show All 108 Lines • Show Last 20 Lines |