#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/errno.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/syslog.h>
#include <sys/ctype.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_frame_relay.h>
Go to the source code of this file.
◆ BYTE1_C_R
◆ BYTE2_BECN
#define BYTE2_BECN 0x04 /* Backward congestion notification */ |
◆ BYTE2_DE
#define BYTE2_DE 0x02 /* Discard elligability */ |
◆ BYTE2_FECN
#define BYTE2_FECN 0x08 /* forwards congestion notification */ |
◆ BYTEX_EA
#define BYTEX_EA 0x01 /* End Address. Always 0 on byte1 */ |
◆ CHAN_ACTIVE
#define CHAN_ACTIVE 0x02 /* bottom level active */ |
◆ CHAN_VALID
#define CHAN_VALID 0x01 /* assigned to a channel */ |
◆ CTX_VALID
#define CTX_VALID 0x8000 /* this bit means it's a valid CTX */ |
◆ CTX_VALUE
#define CTX_VALUE (MAX_CT - 1) /* mask for context part */ |
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
do { error = (x); goto done; } while (0) |
◆ LASTBYTE_D_C
#define LASTBYTE_D_C 0x02 /* last byte is dl_core or dlci info */ |
◆ MAX_CT
#define MAX_CT 16 /* # of dlci's active at a time (POWER OF 2!) */ |
◆ SHIFTIN
◆ SHIFTOUT
◆ sc_p
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
framerelay |
, |
|
|
& |
typestruct |
|
) |
| |
◆ ngfrm_addrlen()
int ngfrm_addrlen |
( |
char * |
hdr | ) |
|
|
static |
◆ ngfrm_allocate_CTX()
static int ngfrm_allocate_CTX |
( |
sc_p |
sc, |
|
|
int |
dlci |
|
) |
| |
|
static |
◆ ngfrm_constructor()
static int ngfrm_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ngfrm_decode()
Definition at line 409 of file ng_frame_relay.c.
References CTX_VALID, CTX_VALUE, data, dlci, ERROUT, makeup, NG_FREE_ITEM, NG_FREE_M, NG_FWD_NEW_DATA, NG_NODE_PRIVATE, ngfrm_addrlen(), NGI_GET_M, and SHIFTIN.
Referenced by ngfrm_rcvdata().
◆ ngfrm_disconnect()
static int ngfrm_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ngfrm_newhook()
static int ngfrm_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ngfrm_rcvdata()
Definition at line 328 of file ng_frame_relay.c.
References BYTEX_EA, CHAN_ACTIVE, data, dlci, ctxinfo::dlci, ERROUT, ctxinfo::flags, ctxinfo::hook, makeup, NG_FREE_ITEM, NG_FREE_M, NG_FWD_NEW_DATA, NG_HOOK_NODE, NG_HOOK_PRIVATE, NG_NODE_PRIVATE, ngfrm_decode(), NGI_GET_M, and SHIFTOUT.
◆ ngfrm_shutdown()
static int ngfrm_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ makeup
Initial value:= {
{ 0xfc, 2, 6 },
{ 0xf0, 4, 4 },
{ 0xfe, 1, 7 },
{ 0xfc, 2, 6 }
}
Referenced by ngfrm_decode(), and ngfrm_rcvdata().
◆ ngfrm_constructor
◆ ngfrm_disconnect
◆ ngfrm_newhook
◆ ngfrm_rcvdata
◆ ngfrm_shutdown
◆ typestruct
Initial value:= {
}
static ng_shutdown_t ngfrm_shutdown
static ng_newhook_t ngfrm_newhook
static ng_constructor_t ngfrm_constructor
static ng_disconnect_t ngfrm_disconnect
static ng_rcvdata_t ngfrm_rcvdata
#define NG_FRAMERELAY_NODE_TYPE
Definition at line 140 of file ng_frame_relay.c.