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 <machine/stdarg.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netnatm/unimsg.h>
#include <netnatm/msg/unistruct.h>
#include <netgraph/atm/ngatmbase.h>
#include <netnatm/saal/sscopdef.h>
#include <netnatm/saal/sscfudef.h>
#include <netgraph/atm/uni/ng_uni_cust.h>
#include <netnatm/sig/uni.h>
#include <netnatm/sig/unisig.h>
#include <netgraph/atm/ng_sscop.h>
#include <netgraph/atm/ng_sscfu.h>
#include <netgraph/atm/ng_uni.h>
Go to the source code of this file.
Data Structures | |
struct | priv |
struct | unimem_debug |
Macros | |
#define | D(S) case S: printf("%s", #S); break |
#define | UNI_DEBUG_DEFINE(D) [UNI_FAC_##D] = #D, |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_NG_UNI, "netgraph_uni_node", "netgraph uni node") |
static | MALLOC_DEFINE (M_UNI, "netgraph_uni_data", "uni protocol data") |
MODULE_DEPEND (ng_uni, ngatmbase, 1, 1, 1) | |
static int | ng_uni_mod_event (module_t, int, void *) |
NETGRAPH_INIT (uni, &ng_uni_typestruct) | |
static void | uni_uni_output (struct uni *, void *, enum uni_sig, u_int32_t, struct uni_msg *) |
static void | uni_saal_output (struct uni *, void *, enum saal_sig, struct uni_msg *) |
static void | uni_verbose (struct uni *, static void uni_do_status(struct uni void *, u_int, static void uni_do_status(struct uni const char *,...) |
static int | ng_uni_constructor (node_p node) |
static int | ng_uni_shutdown (node_p node) |
static void | uni_do_status (struct uni *uni, void *uarg, void *sbuf, const char *fmt,...) |
static int | text_status (node_p node, struct priv *priv, char *buf, u_int len) |
static int | ng_uni_rcvmsg (node_p node, item_p item, hook_p lasthook) |
static int | ng_uni_newhook (node_p node, hook_p hook, const char *name) |
static int | ng_uni_disconnect (hook_p hook) |
static int | ng_uni_rcvupper (hook_p hook, item_p item) |
static void | dump_uni_msg (struct uni_msg *msg) |
static void | dump_saal_signal (node_p node, enum saal_sig sig, struct uni_msg *msg, int to) |
static int | ng_uni_rcvlower (hook_p hook __unused, item_p item) |
static void | uni_verbose (struct uni *uni, void *varg, u_int fac, const char *fmt,...) |
LIST_HEAD (unimem_debug_list, unimem_debug) | |
static void | uni_init (void) |
static void | uni_fini (void) |
void * | ng_uni_malloc (enum unimem type, const char *file, u_int lno) |
void | ng_uni_free (enum unimem type, void *ptr, const char *file, u_int lno) |
#define D | ( | S | ) | case S: printf("%s", #S); break |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 615 of file ng_uni.c.
References D, dump_uni_msg(), NG_NODE_PRIVATE, and priv::uni.
Referenced by ng_uni_rcvlower(), and uni_saal_output().
|
static |
Definition at line 594 of file ng_uni.c.
Referenced by dump_saal_signal().
LIST_HEAD | ( | unimem_debug_list | , |
unimem_debug | |||
) |
|
static |
|
static |
MODULE_DEPEND | ( | ng_uni | , |
ngatmbase | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
NETGRAPH_INIT | ( | uni | , |
& | ng_uni_typestruct | ||
) |
|
static |
Definition at line 224 of file ng_uni.c.
References NG_NODE_FORCE_WRITER, NG_NODE_SET_PRIVATE, and priv::uni.
|
static |
Definition at line 490 of file ng_uni.c.
References priv::lower, NG_HOOK_NAME, NG_HOOK_NODE, NG_NODE_IS_VALID, NG_NODE_NUMHOOKS, NG_NODE_PRIVATE, ng_rmnode_self(), and priv::upper.
void ng_uni_free | ( | enum unimem | type, |
void * | ptr, | ||
const char * | file, | ||
u_int | lno | ||
) |
Definition at line 859 of file ng_uni.c.
References data, unimem_debug::file, unimem_debug::lno, nguni_freemem, nguni_unilist_mtx, nguni_usedmem, type, and unimem_names.
void * ng_uni_malloc | ( | enum unimem | type, |
const char * | file, | ||
u_int | lno | ||
) |
Definition at line 826 of file ng_uni.c.
References data, unimem_debug::file, unimem_debug::lno, nguni_freemem, nguni_unilist_mtx, nguni_usedmem, type, and unimem_sizes.
|
static |
Definition at line 902 of file ng_uni.c.
References event, uni_fini(), and uni_init().
Definition at line 474 of file ng_uni.c.
References priv::lower, name, NG_HOOK_SET_RCVDATA, NG_NODE_PRIVATE, ng_uni_rcvupper, and priv::upper.
Definition at line 655 of file ng_uni.c.
References dump_saal_signal(), priv::enabled, NG_FREE_ITEM, NG_HOOK_NODE, NG_NODE_PRIVATE, NGI_GET_M, sscfu_arg::sig, priv::uni, uni_msg_destroy(), and uni_msg_unpack_mbuf().
Definition at line 307 of file ng_uni.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ngm_uni_set_config::config, ng_mesg::data, priv::enabled, ng_mesg::header, ngm_uni_debug::level, ngm_uni_config_mask::mask, ngm_uni_set_config::mask, NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NG_TEXTRESPONSE, NGI_GET_MSG, NGM_GENERIC_COOKIE, NGM_TEXT_STATUS, NGM_UNI_COOKIE, NGM_UNI_DISABLE, NGM_UNI_ENABLE, NGM_UNI_GET_CONFIG, NGM_UNI_GETDEBUG, NGM_UNI_GETSTATE, NGM_UNI_SET_CONFIG, NGM_UNI_SETDEBUG, text_status(), ng_mesg::ng_msghdr::typecookie, and priv::uni.
Definition at line 520 of file ng_uni.c.
References uni_arg::cookie, priv::enabled, NG_FREE_ITEM, NG_HOOK_NODE, NG_NODE_PRIVATE, NGI_GET_M, uni_arg::sig, priv::uni, uni_msg_destroy(), and uni_msg_unpack_mbuf().
|
static |
Definition at line 242 of file ng_uni.c.
References NG_NODE_PRIVATE, NG_NODE_SET_PRIVATE, NG_NODE_UNREF, and priv::uni.
Definition at line 271 of file ng_uni.c.
References priv::lower, NG_HOOK_NAME, NG_HOOK_NODE, NG_HOOK_PEER, NG_NODE_NAME, priv::uni, and priv::upper.
Referenced by ng_uni_rcvmsg().
|
static |
Definition at line 261 of file ng_uni.c.
Referenced by uni_verbose().
|
static |
Definition at line 799 of file ng_uni.c.
References unimem_debug::file, unimem_debug::lno, nguni_freemem, nguni_unilist_mtx, nguni_usedmem, type, unimem_names, and UNIMEM_TYPES.
Referenced by ng_uni_mod_event().
|
static |
Definition at line 792 of file ng_uni.c.
References nguni_unilist_mtx.
Referenced by ng_uni_mod_event().
|
static |
Definition at line 706 of file ng_uni.c.
References dump_saal_signal(), priv::lower, NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, sscfu_arg::sig, priv::uni, uni_msg_destroy(), and uni_msg_pack_mbuf().
Referenced by uni_verbose().
|
static |
Definition at line 567 of file ng_uni.c.
References uni_arg::cookie, NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, uni_arg::sig, uni_msg_destroy(), uni_msg_pack_mbuf(), and priv::upper.
Referenced by uni_verbose().
|
static |
Definition at line 207 of file ng_uni.c.
References uni_do_status(), uni_saal_output(), uni_uni_output(), and uni_verbose().
Referenced by uni_verbose().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 185 of file ng_uni.c.
Referenced by ng_uni_newhook().
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 766 of file ng_uni.c.
Referenced by ng_uni_free(), ng_uni_malloc(), and uni_fini().
|
static |
Definition at line 781 of file ng_uni.c.
Referenced by ng_uni_free(), ng_uni_malloc(), uni_fini(), and uni_init().
|
static |
Definition at line 773 of file ng_uni.c.
Referenced by ng_uni_free(), ng_uni_malloc(), and uni_fini().
|
static |
Definition at line 783 of file ng_uni.c.
Referenced by ng_uni_free(), and uni_fini().