#include <sys/param.h>
#include <sys/conf.h>
#include <sys/ioccom.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/poll.h>
#include <sys/proc.h>
#include <sys/epoch.h>
#include <sys/queue.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <sys/systm.h>
#include <sys/uio.h>
#include <sys/vnode.h>
#include <net/ethernet.h>
#include <net/if.h>
#include <net/if_var.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_device.h>
#include <netgraph/ng_parse.h>
Go to the source code of this file.
|
static int | ng_device_mod_event (module_t, int, void *) |
|
| NETGRAPH_INIT (device, &ngd_typestruct) |
|
static int | ng_device_constructor (node_p node) |
|
static int | ng_device_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ng_device_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ng_device_rcvdata (hook_p hook, item_p item) |
|
static int | ng_device_disconnect (hook_p hook) |
|
static int | ng_device_shutdown (node_p node) |
|
static int | ngdopen (struct cdev *dev, int flag, int mode, struct thread *td) |
|
static int | ngdclose (struct cdev *dev, int flag, int mode, struct thread *td) |
|
static int | ngdread (struct cdev *dev, struct uio *uio, int flag) |
|
static int | ngdwrite (struct cdev *dev, struct uio *uio, int flag) |
|
static int | ngdpoll (struct cdev *dev, int events, struct thread *td) |
|
◆ DBG
#define DBG do {} while (0) |
◆ ERROUT
#define ERROUT |
( |
|
x | ) |
do { error = (x); goto done; } while (0) |
◆ MAX_NGD
◆ NGDF_OPEN
◆ NGDF_RWAIT
#define NGDF_RWAIT 0x0002 |
◆ priv_p
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
device |
, |
|
|
& |
ngd_typestruct |
|
) |
| |
◆ ng_device_constructor()
static int ng_device_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_device_disconnect()
static int ng_device_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_device_mod_event()
static int ng_device_mod_event |
( |
module_t |
mod, |
|
|
int |
event, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ ng_device_newhook()
static int ng_device_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_device_rcvdata()
◆ ng_device_rcvmsg()
Definition at line 234 of file ng_device.c.
References ng_mesg::ng_msghdr::cmd, ng_mesg::data, ERROUT, ng_mesg::header, NG_DEVICE_DEVNAME, NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_DEVICE_COOKIE, NGM_DEVICE_ETHERALIGN, NGM_DEVICE_GET_DEVNAME, and ng_mesg::ng_msghdr::typecookie.
◆ ng_device_shutdown()
static int ng_device_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ngdclose()
static int ngdclose |
( |
struct cdev * |
dev, |
|
|
int |
flag, |
|
|
int |
mode, |
|
|
struct thread * |
td |
|
) |
| |
|
static |
◆ ngdopen()
static int ngdopen |
( |
struct cdev * |
dev, |
|
|
int |
flag, |
|
|
int |
mode, |
|
|
struct thread * |
td |
|
) |
| |
|
static |
◆ ngdpoll()
static int ngdpoll |
( |
struct cdev * |
dev, |
|
|
int |
events, |
|
|
struct thread * |
td |
|
) |
| |
|
static |
◆ ngdread()
static int ngdread |
( |
struct cdev * |
dev, |
|
|
struct uio * |
uio, |
|
|
int |
flag |
|
) |
| |
|
static |
◆ ngdwrite()
static int ngdwrite |
( |
struct cdev * |
dev, |
|
|
struct uio * |
uio, |
|
|
int |
flag |
|
) |
| |
|
static |
◆ ng_device_cmds
Initial value:= {
{
"getdevname",
NULL,
},
{
"etheralign",
NULL,
NULL
},
{ 0 }
}
#define NGM_DEVICE_COOKIE
const struct ng_parse_type ng_parse_string_type
Definition at line 82 of file ng_device.c.
◆ ng_device_constructor
◆ ng_device_disconnect
◆ ng_device_newhook
◆ ng_device_rcvdata
◆ ng_device_rcvmsg
◆ ng_device_shutdown
◆ ngd_cdevsw
Initial value:= {
.d_version = D_VERSION,
}
static d_close_t ngdclose
static d_write_t ngdwrite
#define NG_DEVICE_DEVNAME
Definition at line 145 of file ng_device.c.
Referenced by ng_device_constructor().
◆ ngd_typestruct
Initial value:= {
}
static ng_shutdown_t ng_device_shutdown
static ng_newhook_t ng_device_newhook
static int ng_device_mod_event(module_t, int, void *)
static ng_rcvmsg_t ng_device_rcvmsg
static ng_disconnect_t ng_device_disconnect
static const struct ng_cmdlist ng_device_cmds[]
static ng_rcvdata_t ng_device_rcvdata
static ng_constructor_t ng_device_constructor
#define NG_DEVICE_NODE_TYPE
Definition at line 101 of file ng_device.c.
◆ ngd_unit
◆ ngdclose
◆ ngdopen
◆ ngdpoll
◆ ngdread
◆ ngdwrite