FreeBSD kernel netgraph code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/callout.h>
#include <sys/sbuf.h>
#include <sys/stdint.h>
#include <machine/stdarg.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netnatm/saal/sscopdef.h>
#include <netgraph/atm/ng_sscop.h>
#include <netgraph/atm/sscop/ng_sscop_cust.h>
#include <netnatm/saal/sscop.h>
Go to the source code of this file.
Data Structures | |
struct | stats |
struct | priv |
Macros | |
#define | DDD printf("%s: %d\n", __func__, __LINE__) |
#define | VERBOSE(P, M, F) |
Functions | |
__FBSDID ("$FreeBSD$") | |
MALLOC_DEFINE (M_NG_SSCOP, "netgraph_sscop", "netgraph sscop node") | |
MODULE_DEPEND (ng_sscop, ngatmbase, 1, 1, 1) | |
static int | ng_sscop_mod_event (module_t, int, void *) |
NETGRAPH_INIT (sscop, &ng_sscop_typestruct) | |
static void | sscop_send_manage (struct sscop *, void *, enum sscop_maasig, struct SSCOP_MBUF_T *, u_int, u_int) |
static void | sscop_send_upper (struct sscop *, void *, enum sscop_aasig, struct SSCOP_MBUF_T *, u_int) |
static void | sscop_send_lower (struct sscop *, void *, struct SSCOP_MBUF_T *) |
static void | sscop_verbose (struct sscop *, void *, const char *,...) |
static int | ng_sscop_constructor (node_p node) |
static int | ng_sscop_shutdown (node_p node) |
static int | flow_upper (node_p node, struct ng_mesg *msg) |
static int | flow_lower (node_p node, struct ng_mesg *msg) |
static int | text_status (node_p node, struct priv *priv, char *arg, u_int len) |
static int | ng_sscop_rcvmsg (node_p node, item_p item, hook_p lasthook) |
static int | ng_sscop_newhook (node_p node, hook_p hook, const char *name) |
static int | ng_sscop_disconnect (hook_p hook) |
static int | ng_sscop_rcvlower (hook_p hook, item_p item) |
static void | sscop_send_lower (struct sscop *sscop, void *p, struct mbuf *m) |
static int | ng_sscop_rcvupper (hook_p hook, item_p item) |
static int | ng_sscop_rcvmanage (hook_p hook, item_p item) |
Variables | |
static const struct ng_parse_struct_field | ng_sscop_param_type_info [] |
static const struct ng_parse_type | ng_sscop_param_type |
static const struct ng_parse_struct_field | ng_sscop_setparam_type_info [] |
static const struct ng_parse_type | ng_sscop_setparam_type |
static const struct ng_parse_struct_field | ng_sscop_setparam_resp_type_info [] |
static const struct ng_parse_type | ng_sscop_setparam_resp_type |
static const struct ng_cmdlist | ng_sscop_cmdlist [] |
static ng_constructor_t | ng_sscop_constructor |
static ng_shutdown_t | ng_sscop_shutdown |
static ng_rcvmsg_t | ng_sscop_rcvmsg |
static ng_newhook_t | ng_sscop_newhook |
static ng_disconnect_t | ng_sscop_disconnect |
static ng_rcvdata_t | ng_sscop_rcvlower |
static ng_rcvdata_t | ng_sscop_rcvupper |
static ng_rcvdata_t | ng_sscop_rcvmanage |
static struct ng_type | ng_sscop_typestruct |
#define DDD printf("%s: %d\n", __func__, __LINE__) |
Definition at line 58 of file ng_sscop.c.
#define VERBOSE | ( | P, | |
M, | |||
F | |||
) |
Definition at line 67 of file ng_sscop.c.
__FBSDID | ( | "$FreeBSD$" | ) |
Definition at line 349 of file ng_sscop.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::header, NG_NODE_PRIVATE, NGM_HIGH_WATER_PASSED, NGM_LOW_WATER_PASSED, and priv::sscop.
Referenced by ng_sscop_rcvmsg().
Definition at line 294 of file ng_sscop.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ngm_queue_state::current, ng_mesg::data, priv::flow, ng_mesg::header, ngm_queue_state::high_watermark, ngm_queue_state::max_queuelen_packets, NG_NODE_PRIVATE, NGM_HIGH_WATER_PASSED, NGM_LOW_WATER_PASSED, NGM_SYNC_QUEUE_STATE, priv::sscop, and VERBOSE.
Referenced by ng_sscop_rcvmsg().
MALLOC_DEFINE | ( | M_NG_SSCOP | , |
"netgraph_sscop" | , | ||
"netgraph sscop node" | |||
) |
MODULE_DEPEND | ( | ng_sscop | , |
ngatmbase | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
NETGRAPH_INIT | ( | sscop | , |
& | ng_sscop_typestruct | ||
) |
|
static |
Definition at line 245 of file ng_sscop.c.
References NG_NODE_FORCE_WRITER, NG_NODE_SET_PRIVATE, and priv::sscop.
|
static |
Definition at line 623 of file ng_sscop.c.
References priv::enabled, priv::lower, priv::manage, NG_HOOK_NODE, NG_NODE_IS_VALID, NG_NODE_NUMHOOKS, NG_NODE_PRIVATE, ng_rmnode_self(), priv::sscop, and priv::upper.
|
static |
Definition at line 856 of file ng_sscop.c.
References event.
Definition at line 605 of file ng_sscop.c.
References priv::lower, priv::manage, name, NG_HOOK_SET_RCVDATA, NG_NODE_PRIVATE, ng_sscop_rcvmanage, ng_sscop_rcvupper, and priv::upper.
Definition at line 658 of file ng_sscop.c.
References priv::enabled, stats::in_dropped, stats::in_packets, NG_FREE_ITEM, NG_HOOK_NODE, NG_NODE_PRIVATE, NGI_GET_M, priv::sscop, priv::stats, and priv::upper.
Definition at line 776 of file ng_sscop.c.
References priv::enabled, NG_FREE_ITEM, NG_HOOK_NODE, NG_NODE_PRIVATE, NGI_GET_M, sscop_marg::sig, and priv::sscop.
Definition at line 440 of file ng_sscop.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, priv::enabled, ng_sscop_setparam_resp::error, priv::flow, flow_lower(), flow_upper(), ng_mesg::header, priv::lower, ng_sscop_setparam::mask, ng_sscop_setparam_resp::mask, NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NG_TEXTRESPONSE, NGI_GET_MSG, NGM_FLOW_COOKIE, NGM_GENERIC_COOKIE, NGM_SSCOP_COOKIE, NGM_SSCOP_DISABLE, NGM_SSCOP_ENABLE, NGM_SSCOP_GETDEBUG, NGM_SSCOP_GETPARAM, NGM_SSCOP_GETSTATE, NGM_SSCOP_SETDEBUG, NGM_SSCOP_SETPARAM, NGM_TEXT_STATUS, ng_sscop_setparam::param, priv::sscop, priv::stats, text_status(), ng_mesg::ng_msghdr::typecookie, and priv::upper.
Definition at line 702 of file ng_sscop.c.
References sscop_arg::arg, priv::enabled, NG_FREE_ITEM, NG_HOOK_NODE, NG_NODE_PRIVATE, NGI_GET_M, sscop_arg::sig, and priv::sscop.
|
static |
Definition at line 264 of file ng_sscop.c.
References NG_NODE_PRIVATE, NG_NODE_SET_PRIVATE, NG_NODE_UNREF, and priv::sscop.
|
static |
|
static |
Definition at line 685 of file ng_sscop.c.
References priv::lower, NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, stats::out_dropped, stats::out_packets, and priv::stats.
|
static |
Definition at line 799 of file ng_sscop.c.
References sscop_merr::cnt, sscop_merr::err, stats::errors, stats::maa_dropped, stats::maa_signals, priv::manage, NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, sscop_marg::sig, sscop_merr::sig, and priv::stats.
Referenced by sscop_verbose().
|
static |
Definition at line 735 of file ng_sscop.c.
References stats::aa_dropped, stats::aa_signals, sscop_arg::arg, stats::data_delivered, priv::flow, NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, sscop_arg::sig, priv::sscop, priv::stats, and priv::upper.
Referenced by sscop_verbose().
|
static |
Definition at line 218 of file ng_sscop.c.
References sscop_send_lower(), sscop_send_manage(), sscop_send_upper(), and sscop_verbose().
Referenced by sscop_verbose().
Definition at line 375 of file ng_sscop.c.
References stats::aa_dropped, stats::aa_signals, stats::data_delivered, priv::enabled, stats::errors, stats::in_dropped, stats::in_packets, priv::lower, stats::maa_dropped, stats::maa_signals, priv::manage, NG_HOOK_NAME, NG_HOOK_NODE, NG_HOOK_PEER, NG_NODE_NAME, stats::out_dropped, stats::out_packets, priv::sscop, priv::stats, and priv::upper.
Referenced by ng_sscop_rcvmsg().
|
static |
Definition at line 134 of file ng_sscop.c.
|
static |
Definition at line 187 of file ng_sscop.c.
|
static |
Definition at line 191 of file ng_sscop.c.
|
static |
Definition at line 190 of file ng_sscop.c.
|
static |
Definition at line 107 of file ng_sscop.c.
|
static |
Definition at line 104 of file ng_sscop.c.
|
static |
Definition at line 192 of file ng_sscop.c.
|
static |
Definition at line 194 of file ng_sscop.c.
Referenced by ng_sscop_newhook().
|
static |
Definition at line 189 of file ng_sscop.c.
|
static |
Definition at line 193 of file ng_sscop.c.
Referenced by ng_sscop_newhook().
|
static |
Definition at line 129 of file ng_sscop.c.
|
static |
Definition at line 126 of file ng_sscop.c.
|
static |
Definition at line 118 of file ng_sscop.c.
|
static |
Definition at line 115 of file ng_sscop.c.
|
static |
Definition at line 188 of file ng_sscop.c.
|
static |
Definition at line 198 of file ng_sscop.c.