#include <sys/param.h>
#include <sys/eventhandler.h>
#include <sys/systm.h>
#include <sys/errno.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/proc.h>
#include <sys/sockio.h>
#include <sys/socket.h>
#include <sys/syslog.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/if_media.h>
#include <net/if_types.h>
#include <net/netisr.h>
#include <net/route.h>
#include <net/vnet.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_eiface.h>
#include <net/bpf.h>
#include <net/ethernet.h>
#include <net/if_arp.h>
Go to the source code of this file.
|
static void | ng_eiface_init (void *xsc) |
|
static void | ng_eiface_start (struct ifnet *ifp) |
|
static int | ng_eiface_ioctl (struct ifnet *ifp, u_long cmd, caddr_t data) |
|
static int | ng_eiface_mod_event (module_t, int, void *) |
|
| NETGRAPH_INIT (eiface, &typestruct) |
|
| VNET_DEFINE_STATIC (struct unrhdr *, ng_eiface_unit) |
|
static void | ng_eiface_start2 (node_p node, hook_p hook, void *arg1, int arg2) |
|
static int | ng_eiface_mediachange (struct ifnet *ifp) |
|
static void | ng_eiface_mediastatus (struct ifnet *ifp, struct ifmediareq *ifmr) |
|
static int | ng_eiface_constructor (node_p node) |
|
static int | ng_eiface_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ng_eiface_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ng_eiface_rcvdata (hook_p hook, item_p item) |
|
static int | ng_eiface_rmnode (node_p node) |
|
static int | ng_eiface_disconnect (hook_p hook) |
|
static void | vnet_ng_eiface_init (const void *unused) |
|
| VNET_SYSINIT (vnet_ng_eiface_init, SI_SUB_PSEUDO, SI_ORDER_ANY, vnet_ng_eiface_init, NULL) |
|
static void | vnet_ng_eiface_uninit (const void *unused) |
|
| VNET_SYSUNINIT (vnet_ng_eiface_uninit, SI_SUB_INIT_IF, SI_ORDER_ANY, vnet_ng_eiface_uninit, NULL) |
|
◆ V_ng_eiface_unit
#define V_ng_eiface_unit VNET(ng_eiface_unit) |
◆ priv_p
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
eiface |
, |
|
|
& |
typestruct |
|
) |
| |
◆ ng_eiface_constructor()
static int ng_eiface_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_eiface_disconnect()
static int ng_eiface_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_eiface_init()
static void ng_eiface_init |
( |
void * |
xsc | ) |
|
|
static |
◆ ng_eiface_ioctl()
static int ng_eiface_ioctl |
( |
struct ifnet * |
ifp, |
|
|
u_long |
cmd, |
|
|
caddr_t |
data |
|
) |
| |
|
static |
◆ ng_eiface_mediachange()
static int ng_eiface_mediachange |
( |
struct ifnet * |
ifp | ) |
|
|
static |
◆ ng_eiface_mediastatus()
static void ng_eiface_mediastatus |
( |
struct ifnet * |
ifp, |
|
|
struct ifmediareq * |
ifmr |
|
) |
| |
|
static |
◆ ng_eiface_mod_event()
static int ng_eiface_mod_event |
( |
module_t |
mod, |
|
|
int |
event, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ ng_eiface_newhook()
static int ng_eiface_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_eiface_rcvdata()
◆ ng_eiface_rcvmsg()
Definition at line 473 of file ng_eiface.c.
References ng_mesg::ng_msghdr::arglen, ng_mesg::ng_msghdr::cmd, ng_mesg::data, ng_mesg::header, NG_FREE_MSG, NG_MKRESPONSE, NG_NODE_PRIVATE, NG_RESPOND_MSG, NGI_GET_MSG, NGM_EIFACE_COOKIE, NGM_EIFACE_GET_IFADDRS, NGM_EIFACE_GET_IFNAME, NGM_EIFACE_SET, NGM_FLOW_COOKIE, NGM_LINK_IS_DOWN, NGM_LINK_IS_UP, and ng_mesg::ng_msghdr::typecookie.
◆ ng_eiface_rmnode()
static int ng_eiface_rmnode |
( |
node_p |
node | ) |
|
|
static |
◆ ng_eiface_start()
static void ng_eiface_start |
( |
struct ifnet * |
ifp | ) |
|
|
static |
◆ ng_eiface_start2()
static void ng_eiface_start2 |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
void * |
arg1, |
|
|
int |
arg2 |
|
) |
| |
|
static |
◆ VNET_DEFINE_STATIC()
VNET_DEFINE_STATIC |
( |
struct unrhdr * |
, |
|
|
ng_eiface_unit |
|
|
) |
| |
◆ vnet_ng_eiface_init()
static void vnet_ng_eiface_init |
( |
const void * |
unused | ) |
|
|
static |
◆ vnet_ng_eiface_uninit()
static void vnet_ng_eiface_uninit |
( |
const void * |
unused | ) |
|
|
static |
◆ VNET_SYSINIT()
◆ VNET_SYSUNINIT()
◆ ng_eiface_cmdlist
Initial value:= {
{
"getifname",
NULL,
},
{
"set",
NULL
},
{ 0 }
}
#define NGM_EIFACE_COOKIE
const struct ng_parse_type ng_parse_enaddr_type
const struct ng_parse_type ng_parse_string_type
Definition at line 63 of file ng_eiface.c.
◆ ng_eiface_constructor
◆ ng_eiface_disconnect
◆ ng_eiface_newhook
◆ ng_eiface_rcvdata
◆ ng_eiface_rcvmsg
◆ ng_eiface_rmnode
◆ typestruct
Initial value:= {
}
static ng_constructor_t ng_eiface_constructor
static ng_shutdown_t ng_eiface_rmnode
static ng_newhook_t ng_eiface_newhook
static ng_rcvmsg_t ng_eiface_rcvmsg
static ng_disconnect_t ng_eiface_disconnect
static ng_rcvdata_t ng_eiface_rcvdata
static const struct ng_cmdlist ng_eiface_cmdlist[]
static int ng_eiface_mod_event(module_t, int, void *)
#define NG_EIFACE_NODE_TYPE
Definition at line 110 of file ng_eiface.c.