#include <sys/param.h>
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/stddef.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_tag.h>
Go to the source code of this file.
|
static int | ng_tag_setdata_in (hook_p hook, const struct ng_tag_hookin *hp) |
|
static int | ng_tag_setdata_out (hook_p hook, const struct ng_tag_hookout *hp) |
|
static int | ng_tag_hookinary_getLength (const struct ng_parse_type *type, const u_char *start, const u_char *buf) |
|
static int | ng_tag_hookoutary_getLength (const struct ng_parse_type *type, const u_char *start, const u_char *buf) |
|
| NETGRAPH_INIT (tag, &typestruct) |
|
static int | ng_tag_constructor (node_p node) |
|
static int | ng_tag_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ng_tag_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ng_tag_rcvdata (hook_p hook, item_p item) |
|
static int | ng_tag_shutdown (node_p node) |
|
static int | ng_tag_disconnect (hook_p hook) |
|
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
do { error = (x); goto done; } while (0) |
◆ M_NETGRAPH_TAG
#define M_NETGRAPH_TAG M_NETGRAPH |
◆ hinfo_p
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
tag |
, |
|
|
& |
typestruct |
|
) |
| |
◆ ng_tag_constructor()
static int ng_tag_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_tag_disconnect()
static int ng_tag_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_tag_hookinary_getLength()
static int ng_tag_hookinary_getLength |
( |
const struct ng_parse_type * |
type, |
|
|
const u_char * |
start, |
|
|
const u_char * |
buf |
|
) |
| |
|
static |
◆ ng_tag_hookoutary_getLength()
static int ng_tag_hookoutary_getLength |
( |
const struct ng_parse_type * |
type, |
|
|
const u_char * |
start, |
|
|
const u_char * |
buf |
|
) |
| |
|
static |
◆ ng_tag_newhook()
static int ng_tag_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_tag_rcvdata()
Definition at line 503 of file ng_tag.c.
References NG_FREE_ITEM, NG_FWD_ITEM_HOOK, NG_HOOK_PRIVATE, NGI_M, ng_bpf_hookstat::recvFrames, ng_bpf_hookstat::recvMatchFrames, ng_bpf_hookstat::recvMatchOctets, ng_bpf_hookstat::recvOctets, ng_bpf_hookinfo::stats, type, ng_bpf_hookstat::xmitFrames, and ng_bpf_hookstat::xmitOctets.
◆ ng_tag_rcvmsg()
Definition at line 349 of file ng_tag.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ERROUT, ng_mesg::header, ng_findhook(), NG_FREE_MSG, NG_HOOK_PRIVATE, NG_MKRESPONSE, NG_RESPOND_MSG, NG_TAG_HOOKIN_SIZE, NG_TAG_HOOKOUT_SIZE, ng_tag_setdata_in(), ng_tag_setdata_out(), NGI_GET_MSG, NGM_TAG_COOKIE, NGM_TAG_GET_HOOKIN, NGM_TAG_GET_HOOKOUT, NGM_TAG_SET_HOOKIN, NGM_TAG_SET_HOOKOUT, ng_tag_hookin::tag_len, ng_tag_hookout::tag_len, ng_tag_hookin::thisHook, ng_tag_hookout::thisHook, and ng_mesg::ng_msghdr::typecookie.
◆ ng_tag_setdata_in()
◆ ng_tag_setdata_out()
◆ ng_tag_shutdown()
static int ng_tag_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ng_tag_cmdlist
◆ ng_tag_constructor
◆ ng_tag_default_in
◆ ng_tag_default_out
◆ ng_tag_disconnect
◆ ng_tag_hookin_type
Initial value:= {
}
const struct ng_parse_type ng_parse_struct_type
static const struct ng_parse_struct_field ng_tag_hookin_type_fields[]
Definition at line 164 of file ng_tag.c.
◆ ng_tag_hookin_type_fields
◆ ng_tag_hookinary_type
Initial value:= {
}
const struct ng_parse_type ng_parse_bytearray_type
static int ng_tag_hookinary_getLength(const struct ng_parse_type *type, const u_char *start, const u_char *buf)
Definition at line 151 of file ng_tag.c.
◆ ng_tag_hookout_type
Initial value:= {
}
static const struct ng_parse_struct_field ng_tag_hookout_type_fields[]
Definition at line 172 of file ng_tag.c.
◆ ng_tag_hookout_type_fields
◆ ng_tag_hookoutary_type
Initial value:= {
}
static int ng_tag_hookoutary_getLength(const struct ng_parse_type *type, const u_char *start, const u_char *buf)
Definition at line 156 of file ng_tag.c.
◆ ng_tag_newhook
◆ ng_tag_rcvdata
◆ ng_tag_rcvmsg
◆ ng_tag_shutdown
◆ typestruct
Initial value:= {
}
static ng_newhook_t ng_tag_newhook
static const struct ng_cmdlist ng_tag_cmdlist[]
static ng_shutdown_t ng_tag_shutdown
static ng_rcvdata_t ng_tag_rcvdata
static ng_disconnect_t ng_tag_disconnect
static ng_constructor_t ng_tag_constructor
static ng_rcvmsg_t ng_tag_rcvmsg
Definition at line 244 of file ng_tag.c.