FreeBSD kernel netgraph code
ng_ether_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_ether_echo.h>
#include <net/ethernet.h>
Include dependency graph for ng_ether_echo.c:

Go to the source code of this file.

Functions

 NETGRAPH_INIT (ether_echo, &typestruct)
 
static int ngee_cons (node_p node)
 
static int ngee_rcvmsg (node_p node, item_p item, hook_p lasthook)
 
static int ngee_rcvdata (hook_p hook, item_p item)
 
static int ngee_disconnect (hook_p hook)
 

Variables

static ng_constructor_t ngee_cons
 
static ng_rcvmsg_t ngee_rcvmsg
 
static ng_rcvdata_t ngee_rcvdata
 
static ng_disconnect_t ngee_disconnect
 
static struct ng_type typestruct
 

Function Documentation

◆ NETGRAPH_INIT()

NETGRAPH_INIT ( ether_echo  ,
typestruct 
)

◆ ngee_cons()

static int ngee_cons ( node_p  node)
static

Definition at line 81 of file ng_ether_echo.c.

◆ ngee_disconnect()

static int ngee_disconnect ( hook_p  hook)
static

Definition at line 137 of file ng_ether_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:

◆ ngee_rcvdata()

static int ngee_rcvdata ( hook_p  hook,
item_p  item 
)
static

Definition at line 105 of file ng_ether_echo.c.

References NG_FREE_ITEM, NG_FWD_NEW_DATA, and NGI_GET_M.

◆ ngee_rcvmsg()

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

Variable Documentation

◆ ngee_cons

ng_constructor_t ngee_cons
static

Definition at line 64 of file ng_ether_echo.c.

◆ ngee_disconnect

ng_disconnect_t ngee_disconnect
static

Definition at line 67 of file ng_ether_echo.c.

◆ ngee_rcvdata

ng_rcvdata_t ngee_rcvdata
static

Definition at line 66 of file ng_ether_echo.c.

◆ ngee_rcvmsg

ng_rcvmsg_t ngee_rcvmsg
static

Definition at line 65 of file ng_ether_echo.c.

◆ typestruct

struct ng_type typestruct
static
Initial value:
= {
.version = NG_ABI_VERSION,
.constructor = ngee_cons,
.rcvmsg = ngee_rcvmsg,
.rcvdata = ngee_rcvdata,
.disconnect = ngee_disconnect,
}
#define NG_ABI_VERSION
Definition: netgraph.h:77
static ng_rcvdata_t ngee_rcvdata
Definition: ng_ether_echo.c:66
static ng_rcvmsg_t ngee_rcvmsg
Definition: ng_ether_echo.c:65
static ng_constructor_t ngee_cons
Definition: ng_ether_echo.c:64
static ng_disconnect_t ngee_disconnect
Definition: ng_ether_echo.c:67
#define NG_ETHER_ECHO_NODE_TYPE
Definition: ng_ether_echo.h:48

Definition at line 70 of file ng_ether_echo.c.