FreeBSD kernel netgraph code
ng_macfilter.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  ngm_macfilter_direct
 
struct  ngm_macfilter_direct_hookid
 
struct  ngm_macfilter_mac
 
struct  ngm_macfilter_macs
 
struct  ngm_macfilter_hook
 
struct  ngm_macfilter_hooks
 

Macros

#define NG_MACFILTER_NODE_TYPE   "macfilter"
 
#define NGM_MACFILTER_COOKIE   1042445461
 
#define NG_MACFILTER_HOOK_ETHER   "ether" /* connected to ether:lower */
 
#define NG_MACFILTER_HOOK_DEFAULT   "default" /* connected to ether:upper; upper[0] */
 
#define NG_MACFILTER_HOOK_DEFAULT_ID   0
 
#define OFFSETOF(s, e)   ((char *)&((s *)0)->e - (char *)((s *)0))
 
#define NGM_MACFILTER_DIRECT_FIELDS
 
#define NGM_MACFILTER_DIRECT_NDX_FIELDS
 
#define NGM_MACFILTER_MAC_FIELDS
 
#define NGM_MACFILTER_MACS_FIELDS
 
#define NGM_MACFILTER_HOOK_FIELDS
 
#define NGM_MACFILTER_HOOKS_FIELDS
 

Enumerations

enum  {
  NGM_MACFILTER_RESET = 1 , NGM_MACFILTER_DIRECT = 2 , NGM_MACFILTER_DIRECT_HOOKID = 3 , NGM_MACFILTER_GET_MACS = 4 ,
  NGM_MACFILTER_GETCLR_MACS = 5 , NGM_MACFILTER_CLR_MACS = 6 , NGM_MACFILTER_GET_HOOKS = 7
}
 

Macro Definition Documentation

◆ NG_MACFILTER_HOOK_DEFAULT

#define NG_MACFILTER_HOOK_DEFAULT   "default" /* connected to ether:upper; upper[0] */

Definition at line 41 of file ng_macfilter.h.

◆ NG_MACFILTER_HOOK_DEFAULT_ID

#define NG_MACFILTER_HOOK_DEFAULT_ID   0

Definition at line 43 of file ng_macfilter.h.

◆ NG_MACFILTER_HOOK_ETHER

#define NG_MACFILTER_HOOK_ETHER   "ether" /* connected to ether:lower */

Definition at line 40 of file ng_macfilter.h.

◆ NG_MACFILTER_NODE_TYPE

#define NG_MACFILTER_NODE_TYPE   "macfilter"

Definition at line 36 of file ng_macfilter.h.

◆ NGM_MACFILTER_COOKIE

#define NGM_MACFILTER_COOKIE   1042445461

Definition at line 37 of file ng_macfilter.h.

◆ NGM_MACFILTER_DIRECT_FIELDS

#define NGM_MACFILTER_DIRECT_FIELDS
Value:
{ \
{ "ether", &ng_parse_enaddr_type }, \
{ "hookname", &ng_parse_hookbuf_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_enaddr_type
Definition: ng_parse.c:1058
const struct ng_parse_type ng_parse_hookbuf_type
Definition: ng_parse.c:851

Definition at line 63 of file ng_macfilter.h.

◆ NGM_MACFILTER_DIRECT_NDX_FIELDS

#define NGM_MACFILTER_DIRECT_NDX_FIELDS
Value:
{ \
{ "ether", &ng_parse_enaddr_type }, \
{ "hookid", &ng_parse_uint16_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint16_type
Definition: ng_parse.c:509

Definition at line 74 of file ng_macfilter.h.

◆ NGM_MACFILTER_HOOK_FIELDS

#define NGM_MACFILTER_HOOK_FIELDS
Value:
{ \
{ "hookname", &ng_parse_hookbuf_type }, \
{ "hookid", &ng_parse_uint16_type }, \
{ "maccnt", &ng_parse_uint32_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint32_type
Definition: ng_parse.c:608

Definition at line 115 of file ng_macfilter.h.

◆ NGM_MACFILTER_HOOKS_FIELDS

#define NGM_MACFILTER_HOOKS_FIELDS
Value:
{ \
{ "n", &ng_parse_uint32_type }, \
{ NULL } \
}
static const struct ng_parse_type ng_macfilter_hooks_array_type
Definition: ng_macfilter.c:166

Definition at line 126 of file ng_macfilter.h.

◆ NGM_MACFILTER_MAC_FIELDS

#define NGM_MACFILTER_MAC_FIELDS
Value:
{ \
{ "ether", &ng_parse_enaddr_type }, \
{ "hookid", &ng_parse_uint16_type }, \
{ "packets_in", &ng_parse_uint64_type }, \
{ "bytes_in", &ng_parse_uint64_type }, \
{ "packets_out", &ng_parse_uint64_type }, \
{ "bytes_out", &ng_parse_uint64_type }, \
{ NULL } \
}
const struct ng_parse_type ng_parse_uint64_type
Definition: ng_parse.c:703

Definition at line 89 of file ng_macfilter.h.

◆ NGM_MACFILTER_MACS_FIELDS

#define NGM_MACFILTER_MACS_FIELDS
Value:
{ \
{ "n", &ng_parse_uint32_type }, \
{ NULL } \
}
static const struct ng_parse_type ng_macfilter_macs_array_type
Definition: ng_macfilter.c:130

Definition at line 103 of file ng_macfilter.h.

◆ OFFSETOF

#define OFFSETOF (   s,
 
)    ((char *)&((s *)0)->e - (char *)((s *)0))

Definition at line 45 of file ng_macfilter.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
NGM_MACFILTER_RESET 
NGM_MACFILTER_DIRECT 
NGM_MACFILTER_DIRECT_HOOKID 
NGM_MACFILTER_GET_MACS 
NGM_MACFILTER_GETCLR_MACS 
NGM_MACFILTER_CLR_MACS 
NGM_MACFILTER_GET_HOOKS 

Definition at line 48 of file ng_macfilter.h.