FreeBSD kernel netgraph code
ng_echo.c File Reference
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_echo.h>
Include dependency graph for ng_echo.c:

Go to the source code of this file.

Functions

 NETGRAPH_INIT (echo, &typestruct)
 
static int nge_cons (node_p node)
 
static int nge_rcvmsg (node_p node, item_p item, hook_p lasthook)
 
static int nge_rcvdata (hook_p hook, item_p item)
 
static int nge_disconnect (hook_p hook)
 

Variables

static ng_constructor_t nge_cons
 
static ng_rcvmsg_t nge_rcvmsg
 
static ng_rcvdata_t nge_rcvdata
 
static ng_disconnect_t nge_disconnect
 
static struct ng_type typestruct
 

Function Documentation

◆ NETGRAPH_INIT()

NETGRAPH_INIT ( echo  ,
typestruct 
)

◆ nge_cons()

static int nge_cons ( node_p  node)
static

Definition at line 77 of file ng_echo.c.

◆ nge_disconnect()

static int nge_disconnect ( hook_p  hook)
static

Definition at line 113 of file ng_echo.c.

References NG_HOOK_NODE, NG_NODE_IS_VALID, NG_NODE_NUMHOOKS, and ng_rmnode_self().

Here is the call graph for this function:

◆ nge_rcvdata()

static int nge_rcvdata ( hook_p  hook,
item_p  item 
)
static

Definition at line 101 of file ng_echo.c.

References NG_FWD_ITEM_HOOK.

◆ nge_rcvmsg()

static int nge_rcvmsg ( node_p  node,
item_p  item,
hook_p  lasthook 
)
static

Definition at line 86 of file ng_echo.c.

References ng_mesg::ng_msghdr::flags, ng_mesg::header, NG_RESPOND_MSG, NGF_RESP, and NGI_GET_MSG.

Variable Documentation

◆ nge_cons

ng_constructor_t nge_cons
static

Definition at line 60 of file ng_echo.c.

◆ nge_disconnect

ng_disconnect_t nge_disconnect
static

Definition at line 63 of file ng_echo.c.

◆ nge_rcvdata

ng_rcvdata_t nge_rcvdata
static

Definition at line 62 of file ng_echo.c.

◆ nge_rcvmsg

ng_rcvmsg_t nge_rcvmsg
static

Definition at line 61 of file ng_echo.c.

◆ typestruct

struct ng_type typestruct
static
Initial value:
= {
.version = NG_ABI_VERSION,
.constructor = nge_cons,
.rcvmsg = nge_rcvmsg,
.rcvdata = nge_rcvdata,
.disconnect = nge_disconnect,
}
#define NG_ABI_VERSION
Definition: netgraph.h:77
static ng_constructor_t nge_cons
Definition: ng_echo.c:60
static ng_rcvmsg_t nge_rcvmsg
Definition: ng_echo.c:61
static ng_disconnect_t nge_disconnect
Definition: ng_echo.c:63
static ng_rcvdata_t nge_rcvdata
Definition: ng_echo.c:62
#define NG_ECHO_NODE_TYPE
Definition: ng_echo.h:48

Definition at line 66 of file ng_echo.c.