#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
#include <sys/errno.h>
#include <sys/fcntl.h>
#include <sys/ioccom.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/priv.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/tty.h>
#include <sys/ttycom.h>
#include <sys/proc.h>
#include <net/if.h>
#include <net/if_var.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_tty.h>
Go to the source code of this file.
|
#define | FLG_DEBUG 0x0002 |
|
#define | ERROUT(x) do { error = (x); goto done; } while (0) |
|
#define | NGTLOCK(sc) IF_LOCK(&sc->outq) |
|
#define | NGTUNLOCK(sc) IF_UNLOCK(&sc->outq) |
|
|
| NETGRAPH_INIT (tty, &typestruct) |
|
static int | ngt_constructor (node_p node) |
|
static int | ngt_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ngt_connect (hook_p hook) |
|
static int | ngt_disconnect (hook_p hook) |
|
static int | ngt_shutdown (node_p node) |
|
static int | ngt_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ngt_rcvdata (hook_p hook, item_p item) |
|
static size_t | ngt_getc_inject (struct tty *tp, void *buf, size_t len) |
|
static size_t | ngt_getc_poll (struct tty *tp) |
|
static size_t | ngt_rint_bypass (struct tty *tp, const void *buf, size_t len) |
|
static int | ngt_rint (struct tty *tp, char c, int flags) |
|
static size_t | ngt_rint_poll (struct tty *tp) |
|
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
do { error = (x); goto done; } while (0) |
◆ FLG_DEBUG
◆ NGTLOCK
#define NGTLOCK |
( |
|
sc | ) |
IF_LOCK(&sc->outq) |
◆ NGTUNLOCK
#define NGTUNLOCK |
( |
|
sc | ) |
IF_UNLOCK(&sc->outq) |
◆ sc_p
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
tty |
, |
|
|
& |
typestruct |
|
) |
| |
◆ ngt_connect()
static int ngt_connect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ngt_constructor()
static int ngt_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ngt_disconnect()
static int ngt_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ngt_getc_inject()
static size_t ngt_getc_inject |
( |
struct tty * |
tp, |
|
|
void * |
buf, |
|
|
size_t |
len |
|
) |
| |
|
static |
◆ ngt_getc_poll()
static size_t ngt_getc_poll |
( |
struct tty * |
tp | ) |
|
|
static |
◆ ngt_newhook()
static int ngt_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ngt_rcvdata()
◆ ngt_rcvmsg()
Definition at line 248 of file ng_tty.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ERROUT, ng_mesg::header, NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_TTY_COOKIE, NGM_TTY_GET_HOTCHAR, NGM_TTY_SET_HOTCHAR, NGM_TTY_SET_TTY, ngt_hook, and ng_mesg::ng_msghdr::typecookie.
◆ ngt_rint()
static int ngt_rint |
( |
struct tty * |
tp, |
|
|
char |
c, |
|
|
int |
flags |
|
) |
| |
|
static |
◆ ngt_rint_bypass()
static size_t ngt_rint_bypass |
( |
struct tty * |
tp, |
|
|
const void * |
buf, |
|
|
size_t |
len |
|
) |
| |
|
static |
◆ ngt_rint_poll()
static size_t ngt_rint_poll |
( |
struct tty * |
tp | ) |
|
|
static |
◆ ngt_shutdown()
static int ngt_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ngt_connect
◆ ngt_constructor
◆ ngt_disconnect
◆ ngt_getc_inject
th_getc_inject_t ngt_getc_inject |
|
static |
◆ ngt_getc_poll
th_getc_poll_t ngt_getc_poll |
|
static |
◆ ngt_hook
Initial value:= {
}
static th_rint_poll_t ngt_rint_poll
static th_getc_inject_t ngt_getc_inject
static th_rint_t ngt_rint
static th_getc_poll_t ngt_getc_poll
static th_rint_bypass_t ngt_rint_bypass
Definition at line 118 of file ng_tty.c.
Referenced by ngt_rcvmsg().
◆ ngt_newhook
◆ ngt_rcvdata
◆ ngt_rcvmsg
◆ ngt_rint
◆ ngt_rint_bypass
th_rint_bypass_t ngt_rint_bypass |
|
static |
◆ ngt_rint_poll
th_rint_poll_t ngt_rint_poll |
|
static |
◆ ngt_shutdown
◆ typestruct
Initial value:= {
}
static ng_disconnect_t ngt_disconnect
static ng_rcvmsg_t ngt_rcvmsg
static ng_connect_t ngt_connect
static ng_constructor_t ngt_constructor
static ng_newhook_t ngt_newhook
static ng_rcvdata_t ngt_rcvdata
static ng_shutdown_t ngt_shutdown
Definition at line 127 of file ng_tty.c.