FreeBSD kernel netgraph code
ng_bpf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ng_bpf_hookprog
 
struct  ng_bpf_hookstat
 

Macros

#define NG_BPF_NODE_TYPE   "bpf"
 
#define NGM_BPF_COOKIE   944100792
 
#define NG_BPF_HOOKPROG_SIZE(numInsn)    (sizeof(struct ng_bpf_hookprog) + (numInsn) * sizeof(struct bpf_insn))
 
#define NG_BPF_HOOKPROG_TYPE_INFO(bptype)
 
#define NG_BPF_HOOKSTAT_TYPE_INFO
 

Enumerations

enum  {
  NGM_BPF_SET_PROGRAM = 1 , NGM_BPF_GET_PROGRAM , NGM_BPF_GET_STATS , NGM_BPF_CLR_STATS ,
  NGM_BPF_GETCLR_STATS
}
 

Macro Definition Documentation

◆ NG_BPF_HOOKPROG_SIZE

#define NG_BPF_HOOKPROG_SIZE (   numInsn)     (sizeof(struct ng_bpf_hookprog) + (numInsn) * sizeof(struct bpf_insn))

Definition at line 60 of file ng_bpf.h.

◆ NG_BPF_HOOKPROG_TYPE_INFO

#define NG_BPF_HOOKPROG_TYPE_INFO (   bptype)
Value:
{ \
{ "thisHook", &ng_parse_hookbuf_type }, \
{ "ifMatch", &ng_parse_hookbuf_type }, \
{ "ifNotMatch", &ng_parse_hookbuf_type }, \
{ "bpf_prog_len", &ng_parse_int32_type }, \
{ "bpf_prog", (bptype) }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_int32_type
Definition: ng_parse.c:598
const struct ng_parse_type ng_parse_hookbuf_type
Definition: ng_parse.c:851

Definition at line 64 of file ng_bpf.h.

◆ NG_BPF_HOOKSTAT_TYPE_INFO

#define NG_BPF_HOOKSTAT_TYPE_INFO
Value:
{ \
{ "recvFrames", &ng_parse_uint64_type }, \
{ "recvOctets", &ng_parse_uint64_type }, \
{ "recvMatchFrames", &ng_parse_uint64_type }, \
{ "recvMatchOctets", &ng_parse_uint64_type }, \
{ "xmitFrames", &ng_parse_uint64_type }, \
{ "xmitOctets", &ng_parse_uint64_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint64_type
Definition: ng_parse.c:703

Definition at line 84 of file ng_bpf.h.

◆ NG_BPF_NODE_TYPE

#define NG_BPF_NODE_TYPE   "bpf"

Definition at line 48 of file ng_bpf.h.

◆ NGM_BPF_COOKIE

#define NGM_BPF_COOKIE   944100792

Definition at line 49 of file ng_bpf.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NGM_BPF_SET_PROGRAM 
NGM_BPF_GET_PROGRAM 
NGM_BPF_GET_STATS 
NGM_BPF_CLR_STATS 
NGM_BPF_GETCLR_STATS 

Definition at line 95 of file ng_bpf.h.