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/socket.h>
#include <sys/socketvar.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 <netnatm/api/unisap.h>
#include <netnatm/sig/unidef.h>
#include <netgraph/atm/ngatmbase.h>
#include <netgraph/atm/ng_uni.h>
#include <netnatm/api/atmapi.h>
#include <netgraph/atm/ng_ccatm.h>
#include <netnatm/api/ccatm.h>
Go to the source code of this file.
Data Structures | |
struct | ccnode |
struct | cchook |
Functions | |
__FBSDID ("$FreeBSD$") | |
MODULE_DEPEND (ng_ccatm, ngatmbase, 1, 1, 1) | |
MALLOC_DEFINE (M_NG_CCATM, "ng_ccatm", "netgraph uni api node") | |
static int | ng_ccatm_addr_req_array_getlen (const struct ng_parse_type *type, const u_char *start, const u_char *buf) |
static int | ng_ccatm_port_array_getlen (const struct ng_parse_type *type, const u_char *start, const u_char *buf) |
static int | ng_ccatm_mod_event (module_t, int, void *) |
NETGRAPH_INIT (ccatm, &ng_ccatm_typestruct) | |
static void | ng_ccatm_send_user (struct ccuser *, void *, u_int, void *, size_t) |
static void | ng_ccatm_respond_user (struct ccuser *, void *, int, u_int, void *, size_t) |
static void | ng_ccatm_send_uni (struct ccconn *, void *, u_int, u_int, struct uni_msg *) |
static void | ng_ccatm_send_uni_glob (struct ccport *, void *, u_int, u_int, struct uni_msg *) |
static void | ng_ccatm_log (const char *,...) |
static int | ng_ccatm_constructor (node_p node) |
static int | ng_ccatm_shutdown (node_p node) |
static int | ng_ccatm_get_addresses (node_p node, uint32_t portno, struct ng_mesg *msg, struct ng_mesg **resp) |
static int | send_dump (struct ccdata *data, void *uarg, const char *buf) |
static int | ng_ccatm_dump (node_p node) |
static int | ng_ccatm_rcvmsg (node_p node, item_p item, hook_p lasthook) |
static int | ng_ccatm_newhook (node_p node, hook_p hook, const char *name) |
static int | ng_ccatm_disconnect (hook_p hook) |
static int | ng_ccatm_rcvdata (hook_p hook, item_p item) |
static struct mbuf * | pack_buf (void *h, size_t hlen, void *t, size_t tlen) |
static int | ng_ccatm_rcvuni (hook_p hook, item_p item) |
static int | ng_ccatm_rcvmanage (hook_p hook, item_p item) |
static int | ng_ccatm_rcvdump (hook_p hook, item_p item) |
__FBSDID | ( | "$FreeBSD$" | ) |
MALLOC_DEFINE | ( | M_NG_CCATM | , |
"ng_ccatm" | , | ||
"netgraph uni api node" | |||
) |
MODULE_DEPEND | ( | ng_ccatm | , |
ngatmbase | , | ||
1 | , | ||
1 | , | ||
1 | |||
) |
NETGRAPH_INIT | ( | ccatm | , |
& | ng_ccatm_typestruct | ||
) |
|
static |
Definition at line 123 of file ng_ccatm.c.
References ngm_ccatm_get_addresses::addr, and ngm_ccatm_get_addresses::count.
|
static |
Definition at line 347 of file ng_ccatm.c.
References NG_NODE_SET_PRIVATE, and ccnode::node.
|
static |
Definition at line 871 of file ng_ccatm.c.
References ccnode::data, cchook::hook, cchook::inst, cchook::is_uni, priv::manage, NG_HOOK_NODE, NG_HOOK_PRIVATE, NG_HOOK_SET_PRIVATE, NG_NODE_IS_VALID, NG_NODE_NUMHOOKS, NG_NODE_PRIVATE, ng_rmnode_self(), ccnode::node, and cchook::node.
|
static |
Definition at line 462 of file ng_ccatm.c.
References NG_NODE_PRIVATE, NG_SEND_DATA_ONLY, ccnode::node, and send_dump().
Referenced by ng_ccatm_rcvmsg().
|
static |
Definition at line 391 of file ng_ccatm.c.
References ngm_ccatm_addr_req::addr, ngm_ccatm_get_addresses::addr, ngm_ccatm_get_addresses::count, count, NG_MKRESPONSE, NG_NODE_PRIVATE, ccnode::node, and ngm_ccatm_addr_req::port.
Referenced by ng_ccatm_rcvmsg().
|
static |
Definition at line 332 of file ng_ccatm.c.
References ng_ccatm_log(), ng_ccatm_respond_user(), ng_ccatm_send_uni(), ng_ccatm_send_uni_glob(), and ng_ccatm_send_user().
Referenced by ng_ccatm_log().
|
static |
Definition at line 1175 of file ng_ccatm.c.
References event.
Definition at line 788 of file ng_ccatm.c.
References cchook::hook, cchook::inst, cchook::is_uni, priv::manage, name, ng_ccatm_rcvdump, ng_ccatm_rcvmanage, ng_ccatm_rcvuni, NG_HOOK_FORCE_QUEUE, NG_HOOK_NAME, NG_HOOK_SET_PRIVATE, NG_HOOK_SET_RCVDATA, NG_NODE_PRIVATE, ccnode::node, and cchook::node.
|
static |
Definition at line 149 of file ng_ccatm.c.
References ngm_ccatm_portlist::nports, and ngm_ccatm_portlist::ports.
Definition at line 915 of file ng_ccatm.c.
References ccnode::data, cchook::hook, cchook::inst, NG_FREE_ITEM, NG_HOOK_PRIVATE, NGI_GET_M, cchook::node, ccatm_op::op, uni_msg_destroy(), and uni_msg_unpack_mbuf().
Definition at line 1154 of file ng_ccatm.c.
References NG_FREE_ITEM.
Definition at line 1147 of file ng_ccatm.c.
References NG_FREE_ITEM.
Definition at line 485 of file ng_ccatm.c.
References ngm_ccatm_addr_req::addr, ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ng_mesg::header, ng_ccatm_dump(), ng_ccatm_get_addresses(), NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_CCATM_ADDRESS_REGISTERED, NGM_CCATM_ADDRESS_UNREGISTERED, NGM_CCATM_CLEAR, NGM_CCATM_COOKIE, NGM_CCATM_DUMP, NGM_CCATM_GET_ADDRESSES, NGM_CCATM_GET_EXSTAT, NGM_CCATM_GET_PORT_PARAM, NGM_CCATM_GET_PORTLIST, NGM_CCATM_GETSTATE, NGM_CCATM_RESET, NGM_CCATM_SET_PORT_PARAM, NGM_CCATM_SETLOG, NGM_CCATM_START, NGM_CCATM_STOP, ccnode::node, ngm_ccatm_portlist::nports, ngm_ccatm_addr_req::port, ngm_ccatm_port::port, ngm_ccatm_portlist::ports, and ng_mesg::ng_msghdr::typecookie.
Definition at line 1049 of file ng_ccatm.c.
References uni_arg::cookie, ccnode::data, cchook::hook, cchook::inst, NG_FREE_ITEM, NG_HOOK_PRIVATE, NGI_GET_M, cchook::node, uni_arg::sig, uni_msg_destroy(), and uni_msg_unpack_mbuf().
|
static |
Definition at line 1022 of file ng_ccatm.c.
References data, cchook::hook, NG_SEND_DATA_ONLY, ccatm_op::op, and pack_buf().
Referenced by ng_ccatm_log().
|
static |
Definition at line 1097 of file ng_ccatm.c.
References uni_arg::cookie, cchook::hook, NG_SEND_DATA_ONLY, uni_arg::sig, uni_msg_destroy(), and uni_msg_pack_mbuf().
Referenced by ng_ccatm_log().
|
static |
Definition at line 1122 of file ng_ccatm.c.
References uni_arg::cookie, cchook::hook, NG_SEND_DATA_ONLY, uni_arg::sig, uni_msg_destroy(), and uni_msg_pack_mbuf().
Referenced by ng_ccatm_log().
|
static |
Definition at line 1000 of file ng_ccatm.c.
References cchook::hook, NG_SEND_DATA_ONLY, ccatm_op::op, and pack_buf().
Referenced by ng_ccatm_log().
|
static |
Definition at line 372 of file ng_ccatm.c.
References NG_NODE_PRIVATE, NG_NODE_SET_PRIVATE, NG_NODE_UNREF, and ccnode::node.
|
static |
Definition at line 950 of file ng_ccatm.c.
References last.
Referenced by ng_ccatm_respond_user(), and ng_ccatm_send_user().
|
static |
Definition at line 431 of file ng_ccatm.c.
Referenced by ng_ccatm_dump().
|
static |
Definition at line 100 of file ng_ccatm.c.
|
static |
Definition at line 98 of file ng_ccatm.c.
|
static |
Definition at line 134 of file ng_ccatm.c.
|
static |
Definition at line 132 of file ng_ccatm.c.
|
static |
Definition at line 116 of file ng_ccatm.c.
|
static |
Definition at line 114 of file ng_ccatm.c.
|
static |
Definition at line 84 of file ng_ccatm.c.
|
static |
Definition at line 82 of file ng_ccatm.c.
|
static |
Definition at line 176 of file ng_ccatm.c.
|
static |
Definition at line 274 of file ng_ccatm.c.
|
static |
Definition at line 279 of file ng_ccatm.c.
|
static |
Definition at line 76 of file ng_ccatm.c.
|
static |
Definition at line 74 of file ng_ccatm.c.
|
static |
Definition at line 142 of file ng_ccatm.c.
|
static |
Definition at line 140 of file ng_ccatm.c.
|
static |
Definition at line 277 of file ng_ccatm.c.
|
static |
Definition at line 160 of file ng_ccatm.c.
|
static |
Definition at line 158 of file ng_ccatm.c.
|
static |
Definition at line 92 of file ng_ccatm.c.
|
static |
Definition at line 90 of file ng_ccatm.c.
|
static |
Definition at line 168 of file ng_ccatm.c.
|
static |
Definition at line 166 of file ng_ccatm.c.
|
static |
Definition at line 278 of file ng_ccatm.c.
|
static |
Definition at line 297 of file ng_ccatm.c.
Referenced by ng_ccatm_newhook().
|
static |
Definition at line 298 of file ng_ccatm.c.
Referenced by ng_ccatm_newhook().
|
static |
Definition at line 275 of file ng_ccatm.c.
|
static |
Definition at line 296 of file ng_ccatm.c.
Referenced by ng_ccatm_newhook().
|
static |
Definition at line 276 of file ng_ccatm.c.
|
static |
Definition at line 282 of file ng_ccatm.c.
|
static |
Definition at line 108 of file ng_ccatm.c.
|
static |
Definition at line 106 of file ng_ccatm.c.