44#ifndef _NETGRAPH_NG_BPF_H_
45#define _NETGRAPH_NG_BPF_H_
48#define NG_BPF_NODE_TYPE "bpf"
49#define NGM_BPF_COOKIE 944100792
60#define NG_BPF_HOOKPROG_SIZE(numInsn) \
61 (sizeof(struct ng_bpf_hookprog) + (numInsn) * sizeof(struct bpf_insn))
64#define NG_BPF_HOOKPROG_TYPE_INFO(bptype) { \
65 { "thisHook", &ng_parse_hookbuf_type }, \
66 { "ifMatch", &ng_parse_hookbuf_type }, \
67 { "ifNotMatch", &ng_parse_hookbuf_type }, \
68 { "bpf_prog_len", &ng_parse_int32_type }, \
69 { "bpf_prog", (bptype) }, \
84#define NG_BPF_HOOKSTAT_TYPE_INFO { \
85 { "recvFrames", &ng_parse_uint64_type }, \
86 { "recvOctets", &ng_parse_uint64_type }, \
87 { "recvMatchFrames", &ng_parse_uint64_type }, \
88 { "recvMatchOctets", &ng_parse_uint64_type }, \
89 { "xmitFrames", &ng_parse_uint64_type }, \
90 { "xmitOctets", &ng_parse_uint64_type }, \
char ifNotMatch[NG_HOOKSIZ]
char thisHook[NG_HOOKSIZ]
struct bpf_insn bpf_prog[]
u_int64_t recvMatchFrames
u_int64_t recvMatchOctets