FreeBSD kernel netgraph code
ng_UI.c File Reference
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/errno.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_UI.h>
Include dependency graph for ng_UI.c:

Go to the source code of this file.

Data Structures

struct  ng_UI_private
 

Macros

#define HDLC_UI   0x03
 
#define MAX_ENCAPS_HDR   1
 
#define ERROUT(x)   do { error = (x); goto done; } while (0)
 

Typedefs

typedef struct ng_UI_privatepriv_p
 

Functions

 NETGRAPH_INIT (UI, &typestruct)
 
static int ng_UI_constructor (node_p node)
 
static int ng_UI_newhook (node_p node, hook_p hook, const char *name)
 
static int ng_UI_rcvmsg (node_p node, item_p item, hook_p lasthook)
 
static int ng_UI_rcvdata (hook_p hook, item_p item)
 
static int ng_UI_shutdown (node_p node)
 
static int ng_UI_disconnect (hook_p hook)
 

Variables

static ng_constructor_t ng_UI_constructor
 
static ng_rcvmsg_t ng_UI_rcvmsg
 
static ng_shutdown_t ng_UI_shutdown
 
static ng_newhook_t ng_UI_newhook
 
static ng_rcvdata_t ng_UI_rcvdata
 
static ng_disconnect_t ng_UI_disconnect
 
static struct ng_type typestruct
 

Macro Definition Documentation

◆ ERROUT

#define ERROUT (   x)    do { error = (x); goto done; } while (0)

Definition at line 161 of file ng_UI.c.

◆ HDLC_UI

#define HDLC_UI   0x03

Definition at line 61 of file ng_UI.c.

◆ MAX_ENCAPS_HDR

#define MAX_ENCAPS_HDR   1

Definition at line 160 of file ng_UI.c.

Typedef Documentation

◆ priv_p

typedef struct ng_UI_private* priv_p

Definition at line 68 of file ng_UI.c.

Function Documentation

◆ NETGRAPH_INIT()

NETGRAPH_INIT ( UI  ,
typestruct 
)

◆ ng_UI_constructor()

static int ng_UI_constructor ( node_p  node)
static

Definition at line 100 of file ng_UI.c.

References NG_NODE_SET_PRIVATE.

◆ ng_UI_disconnect()

static int ng_UI_disconnect ( hook_p  hook)
static

Definition at line 224 of file ng_UI.c.

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

Here is the call graph for this function:

◆ ng_UI_newhook()

static int ng_UI_newhook ( node_p  node,
hook_p  hook,
const char *  name 
)
static

Definition at line 114 of file ng_UI.c.

References name, NG_NODE_PRIVATE, NG_UI_HOOK_DOWNSTREAM, and NG_UI_HOOK_UPSTREAM.

◆ ng_UI_rcvdata()

static int ng_UI_rcvdata ( hook_p  hook,
item_p  item 
)
static

◆ ng_UI_rcvmsg()

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

◆ ng_UI_shutdown()

static int ng_UI_shutdown ( node_p  node)
static

Definition at line 209 of file ng_UI.c.

References NG_NODE_PRIVATE, NG_NODE_SET_PRIVATE, and NG_NODE_UNREF.

Variable Documentation

◆ ng_UI_constructor

ng_constructor_t ng_UI_constructor
static

Definition at line 71 of file ng_UI.c.

◆ ng_UI_disconnect

ng_disconnect_t ng_UI_disconnect
static

Definition at line 76 of file ng_UI.c.

◆ ng_UI_newhook

ng_newhook_t ng_UI_newhook
static

Definition at line 74 of file ng_UI.c.

◆ ng_UI_rcvdata

ng_rcvdata_t ng_UI_rcvdata
static

Definition at line 75 of file ng_UI.c.

◆ ng_UI_rcvmsg

ng_rcvmsg_t ng_UI_rcvmsg
static

Definition at line 72 of file ng_UI.c.

◆ ng_UI_shutdown

ng_shutdown_t ng_UI_shutdown
static

Definition at line 73 of file ng_UI.c.

◆ typestruct

struct ng_type typestruct
static
Initial value:
= {
.version = NG_ABI_VERSION,
.name = NG_UI_NODE_TYPE,
.constructor = ng_UI_constructor,
.rcvmsg = ng_UI_rcvmsg,
.shutdown = ng_UI_shutdown,
.newhook = ng_UI_newhook,
.rcvdata = ng_UI_rcvdata,
.disconnect = ng_UI_disconnect,
}
#define NG_ABI_VERSION
Definition: netgraph.h:77
static ng_constructor_t ng_UI_constructor
Definition: ng_UI.c:71
static ng_disconnect_t ng_UI_disconnect
Definition: ng_UI.c:76
static ng_newhook_t ng_UI_newhook
Definition: ng_UI.c:74
static ng_rcvmsg_t ng_UI_rcvmsg
Definition: ng_UI.c:72
static ng_rcvdata_t ng_UI_rcvdata
Definition: ng_UI.c:75
static ng_shutdown_t ng_UI_shutdown
Definition: ng_UI.c:73
#define NG_UI_NODE_TYPE
Definition: ng_UI.h:48

Definition at line 79 of file ng_UI.c.