#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/mbuf.h>
#include <sys/malloc.h>
#include <sys/ctype.h>
#include <sys/errno.h>
#include <sys/queue.h>
#include <sys/syslog.h>
#include <net/ethernet.h>
#include <netgraph/ng_message.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_etf.h>
#include <netgraph/netgraph.h>
Go to the source code of this file.
|
#define | M_NETGRAPH_ETF M_NETGRAPH |
|
#define | HASHSIZE 16 /* Dont change this without changing HASH() */ |
|
#define | HASH(et) ((((et)>>12)+((et)>>8)+((et)>>4)+(et)) & 0x0f) |
|
◆ HASH
#define HASH |
( |
|
et | ) |
((((et)>>12)+((et)>>8)+((et)>>4)+(et)) & 0x0f) |
◆ HASHSIZE
#define HASHSIZE 16 /* Dont change this without changing HASH() */ |
◆ M_NETGRAPH_ETF
#define M_NETGRAPH_ETF M_NETGRAPH |
◆ etf_p
◆ LIST_HEAD()
LIST_HEAD |
( |
filterhead |
, |
|
|
filter |
|
|
) |
| |
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
etf |
, |
|
|
& |
typestruct |
|
) |
| |
◆ ng_etf_constructor()
static int ng_etf_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_etf_disconnect()
static int ng_etf_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
Definition at line 450 of file ng_etf.c.
References ETF::downstream_hook, HASHSIZE, ETF::hashtable, ETF_hookinfo::hook, M_NETGRAPH_ETF, NG_HOOK_NODE, NG_HOOK_PRIVATE, NG_HOOK_SET_PRIVATE, NG_NODE_IS_VALID, NG_NODE_NUMHOOKS, NG_NODE_PRIVATE, ng_rmnode_self(), and ETF::nomatch_hook.
◆ ng_etf_findentry()
static struct filter * ng_etf_findentry |
( |
etf_p |
etfp, |
|
|
u_int16_t |
ethertype |
|
) |
| |
|
static |
◆ ng_etf_newhook()
static int ng_etf_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
Definition at line 199 of file ng_etf.c.
References ETF::downstream_hook, ETF_hookinfo::hook, M_NETGRAPH_ETF, name, NG_ETF_HOOK_DOWNSTREAM, NG_ETF_HOOK_NOMATCH, NG_HOOK_SET_PRIVATE, NG_NODE_PRIVATE, ETF::nomatch_hook, ETF::packets_in, and ETF::packets_out.
◆ ng_etf_rcvdata()
Definition at line 364 of file ng_etf.c.
References ETF::downstream_hook, ETF_hookinfo::hook, ng_etf_findentry(), NG_FREE_ITEM, NG_FREE_M, NG_FWD_NEW_DATA, NG_HOOK_NODE, NG_HOOK_PRIVATE, NG_NODE_PRIVATE, NGI_GET_M, ETF::nomatch_hook, ETF::packets_in, and ETF::packets_out.
◆ ng_etf_rcvmsg()
Definition at line 247 of file ng_etf.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ETF::downstream_hook, ng_etffilter::ethertype, ETF::flags, HASH, ETF::hashtable, ng_mesg::header, ETF_hookinfo::hook, M_NETGRAPH_ETF, ng_etffilter::matchhook, ng_etf_findentry(), ng_findhook(), NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_ETF_COOKIE, NGM_ETF_GET_STATUS, NGM_ETF_SET_FILTER, NGM_ETF_SET_FLAG, ETF::packets_in, ETF::packets_out, and ng_mesg::ng_msghdr::typecookie.
◆ ng_etf_shutdown()
static int ng_etf_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ng_etf_cmdlist
Initial value:= {
{
"getstatus",
NULL,
},
{
"setflag",
NULL
},
{
"setfilter",
NULL
},
{ 0 }
}
static const struct ng_parse_type ng_etf_stat_type
static const struct ng_parse_type ng_etf_filter_type
const struct ng_parse_type ng_parse_int32_type
Definition at line 91 of file ng_etf.c.
◆ ng_etf_constructor
◆ ng_etf_disconnect
◆ ng_etf_filter_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_etf_filter_type_fields[]
const struct ng_parse_type ng_parse_struct_type
Definition at line 85 of file ng_etf.c.
◆ ng_etf_filter_type_fields
◆ ng_etf_newhook
◆ ng_etf_rcvdata
◆ ng_etf_rcvmsg
◆ ng_etf_shutdown
◆ ng_etf_stat_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_etf_stat_type_fields[]
Definition at line 78 of file ng_etf.c.
◆ ng_etf_stat_type_fields
◆ typestruct
Initial value:= {
}
static ng_disconnect_t ng_etf_disconnect
static ng_shutdown_t ng_etf_shutdown
static ng_rcvmsg_t ng_etf_rcvmsg
static ng_rcvdata_t ng_etf_rcvdata
static ng_newhook_t ng_etf_newhook
static const struct ng_cmdlist ng_etf_cmdlist[]
static ng_constructor_t ng_etf_constructor
Definition at line 117 of file ng_etf.c.