FreeBSD kernel netgraph code
|
#include <sys/param.h>
#include <sys/errno.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/time.h>
#include <vm/uma.h>
#include <net/vnet.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_pipe.h>
Go to the source code of this file.
Data Structures | |
struct | ngp_hdr |
struct | ngp_fifo |
struct | hookinfo |
struct | node_priv |
Macros | |
#define | FIFO_VTIME_SORT(plen) |
Typedefs | |
typedef struct node_priv * | priv_p |
Functions | |
static | MALLOC_DEFINE (M_NG_PIPE, "ng_pipe", "ng_pipe") |
TAILQ_HEAD (p_head, ngp_hdr) | |
static void | parse_cfg (struct ng_pipe_hookcfg *, struct ng_pipe_hookcfg *, struct hookinfo *, priv_p) |
static void | pipe_dequeue (struct hookinfo *, struct timeval *) |
static void | ngp_callout (node_p, hook_p, void *, int) |
static int | ngp_modevent (module_t, int, void *) |
NETGRAPH_INIT (pipe, &ng_pipe_typestruct) | |
static int | ngp_constructor (node_p node) |
static int | ngp_newhook (node_p node, hook_p hook, const char *name) |
static int | ngp_rcvmsg (node_p node, item_p item, hook_p lasthook) |
static int | ip_hash (struct mbuf *m, int offset) |
static int | ngp_rcvdata (hook_p hook, item_p item) |
static int | ngp_shutdown (node_p node) |
static int | ngp_disconnect (hook_p hook) |
#define FIFO_VTIME_SORT | ( | plen | ) |
|
static |
Definition at line 565 of file ng_pipe.c.
Referenced by ngp_rcvdata().
|
static |
NETGRAPH_INIT | ( | pipe | , |
& | ng_pipe_typestruct | ||
) |
Definition at line 891 of file ng_pipe.c.
References priv::lower, NG_NODE_PRIVATE, pipe_dequeue(), and priv::upper.
Referenced by pipe_dequeue().
|
static |
Definition at line 252 of file ng_pipe.c.
References ng_callout_init, NG_NODE_FORCE_WRITER, and NG_NODE_SET_PRIVATE.
|
static |
Definition at line 936 of file ng_pipe.c.
References hookinfo::hook, NG_HOOK_PRIVATE, and ngp_zone.
|
static |
Definition at line 269 of file ng_pipe.c.
References hookinfo::hook, priv::lower, name, NG_HOOK_PRIVATE, NG_HOOK_SET_PRIVATE, NG_NODE_PRIVATE, NG_PIPE_HOOK_LOWER, NG_PIPE_HOOK_UPPER, and priv::upper.
Definition at line 589 of file ng_pipe.c.
References hookinfo::dest, FIFO_VTIME_SORT, hookinfo::hook, ip_hash(), priv::lower, NG_FREE_ITEM, NG_FWD_ITEM_HOOK, NG_HOOK_NODE, NG_HOOK_PRIVATE, NG_NODE_PRIVATE, NGI_GET_M, NGI_M, ngp_zone, hookinfo::noqueue, pipe_dequeue(), hookinfo::stats, and priv::upper.
Definition at line 297 of file ng_pipe.c.
References ng_mesg::ng_msghdr::arglen, ng_pipe_hookcfg::bandwidth, ng_pipe_cfg::bandwidth, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ng_pipe_cfg::delay, ng_pipe_run::downstream, ng_pipe_cfg::downstream, ng_mesg::header, ng_pipe_cfg::header_offset, priv::lower, MAX_OHSIZE, NG_FREE_MSG, NG_MKMESSAGE, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NG_SEND_MSG_HOOK, NGI_GET_MSG, NGM_FLOW_COOKIE, NGM_LINK_IS_DOWN, NGM_LINK_IS_UP, NGM_PIPE_CLR_STATS, NGM_PIPE_COOKIE, NGM_PIPE_GET_CFG, NGM_PIPE_GET_RUN, NGM_PIPE_GET_STATS, NGM_PIPE_GETCLR_STATS, NGM_PIPE_SET_CFG, ng_pipe_cfg::overhead, parse_cfg(), ng_mesg::ng_msghdr::typecookie, priv::upper, ng_pipe_run::upstream, and ng_pipe_cfg::upstream.
|
static |
Definition at line 913 of file ng_pipe.c.
References priv::lower, ng_bypass(), NG_NODE_PRIVATE, NG_NODE_UNREF, ng_rmhook_self(), ng_uncallout(), and priv::upper.
|
static |
Definition at line 456 of file ng_pipe.c.
References ng_pipe_hookcfg::bandwidth, ng_pipe_hookcfg::ber, ng_pipe_hookcfg::drophead, ng_pipe_hookcfg::droptail, ng_pipe_hookcfg::drr, ng_pipe_hookcfg::duplicate, ng_pipe_hookcfg::fifo, MAX_FSIZE, MAX_OHSIZE, hookinfo::noqueue, ng_pipe_hookcfg::qin_size_limit, ng_pipe_hookcfg::qout_size_limit, and ng_pipe_hookcfg::wfq.
Referenced by ngp_rcvmsg().
|
static |
Definition at line 731 of file ng_pipe.c.
References hookinfo::dest, FIFO_VTIME_SORT, hookinfo::hook, priv::lower, ng_callout(), NG_HOOK_NODE, NG_NODE_PRIVATE, NG_SEND_DATA, ngp_callout(), ngp_zone, hookinfo::stats, and priv::upper.
Referenced by ngp_callout(), and ngp_rcvdata().
TAILQ_HEAD | ( | p_head | , |
ngp_hdr | |||
) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 137 of file ng_pipe.c.
Referenced by ngp_disconnect(), ngp_modevent(), ngp_rcvdata(), and pipe_dequeue().