#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/errno.h>
#include <sys/syslog.h>
#include <sys/socket.h>
#include <net/if.h>
#include <net/route.h>
#include <net/if_types.h>
#include <net/if_var.h>
#include <net/if_gif.h>
#include <net/vnet.h>
#include <netgraph/ng_message.h>
#include <netgraph/netgraph.h>
#include <netgraph/ng_parse.h>
#include <netgraph/ng_gif.h>
Go to the source code of this file.
|
#define | IFP2NG(ifp) ((struct ng_node *)((struct gif_softc *)(ifp->if_softc))->gif_netgraph) |
|
#define | IFP2NG_SET(ifp, val) (((struct gif_softc *)(ifp->if_softc))->gif_netgraph = (val)) |
|
|
static void | ng_gif_input (struct ifnet *ifp, struct mbuf **mp, int af) |
|
static void | ng_gif_input_orphan (struct ifnet *ifp, struct mbuf *m, int af) |
|
static void | ng_gif_attach (struct ifnet *ifp) |
|
static void | ng_gif_detach (struct ifnet *ifp) |
|
static void | ng_gif_input2 (node_p node, struct mbuf **mp, int af) |
|
static int | ng_gif_glue_af (struct mbuf **mp, int af) |
|
static int | ng_gif_rcv_lower (node_p node, struct mbuf *m) |
|
static int | ng_gif_mod_event (module_t mod, int event, void *data) |
|
| MODULE_DEPEND (ng_gif, if_gif, 1, 1, 1) |
|
| NETGRAPH_INIT (gif, &ng_gif_typestruct) |
|
static int | ng_gif_constructor (node_p node) |
|
static int | ng_gif_newhook (node_p node, hook_p hook, const char *name) |
|
static int | ng_gif_connect (hook_p hook) |
|
static int | ng_gif_rcvmsg (node_p node, item_p item, hook_p lasthook) |
|
static int | ng_gif_rcvdata (hook_p hook, item_p item) |
|
static int | ng_gif_shutdown (node_p node) |
|
static int | ng_gif_disconnect (hook_p hook) |
|
◆ IFP2NG
#define IFP2NG |
( |
|
ifp | ) |
((struct ng_node *)((struct gif_softc *)(ifp->if_softc))->gif_netgraph) |
◆ IFP2NG_SET
#define IFP2NG_SET |
( |
|
ifp, |
|
|
|
val |
|
) |
| (((struct gif_softc *)(ifp->if_softc))->gif_netgraph = (val)) |
◆ priv_p
◆ MODULE_DEPEND()
MODULE_DEPEND |
( |
ng_gif |
, |
|
|
if_gif |
, |
|
|
1 |
, |
|
|
1 |
, |
|
|
1 |
|
|
) |
| |
◆ NETGRAPH_INIT()
NETGRAPH_INIT |
( |
gif |
, |
|
|
& |
ng_gif_typestruct |
|
) |
| |
◆ ng_gif_attach()
static void ng_gif_attach |
( |
struct ifnet * |
ifp | ) |
|
|
static |
◆ ng_gif_connect()
static int ng_gif_connect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_gif_constructor()
static int ng_gif_constructor |
( |
node_p |
node | ) |
|
|
static |
◆ ng_gif_detach()
static void ng_gif_detach |
( |
struct ifnet * |
ifp | ) |
|
|
static |
◆ ng_gif_disconnect()
static int ng_gif_disconnect |
( |
hook_p |
hook | ) |
|
|
static |
◆ ng_gif_glue_af()
static int ng_gif_glue_af |
( |
struct mbuf ** |
mp, |
|
|
int |
af |
|
) |
| |
|
static |
◆ ng_gif_input()
static void ng_gif_input |
( |
struct ifnet * |
ifp, |
|
|
struct mbuf ** |
mp, |
|
|
int |
af |
|
) |
| |
|
static |
◆ ng_gif_input2()
static void ng_gif_input2 |
( |
node_p |
node, |
|
|
struct mbuf ** |
mp, |
|
|
int |
af |
|
) |
| |
|
static |
◆ ng_gif_input_orphan()
static void ng_gif_input_orphan |
( |
struct ifnet * |
ifp, |
|
|
struct mbuf * |
m, |
|
|
int |
af |
|
) |
| |
|
static |
◆ ng_gif_mod_event()
static int ng_gif_mod_event |
( |
module_t |
mod, |
|
|
int |
event, |
|
|
void * |
data |
|
) |
| |
|
static |
◆ ng_gif_newhook()
static int ng_gif_newhook |
( |
node_p |
node, |
|
|
hook_p |
hook, |
|
|
const char * |
name |
|
) |
| |
|
static |
◆ ng_gif_rcv_lower()
static int ng_gif_rcv_lower |
( |
node_p |
node, |
|
|
struct mbuf * |
m |
|
) |
| |
|
static |
◆ ng_gif_rcvdata()
◆ ng_gif_rcvmsg()
Definition at line 392 of file ng_gif.c.
References 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_GIF_COOKIE, NGM_GIF_GET_IFINDEX, NGM_GIF_GET_IFNAME, and ng_mesg::ng_msghdr::typecookie.
◆ ng_gif_shutdown()
static int ng_gif_shutdown |
( |
node_p |
node | ) |
|
|
static |
◆ ng_gif_cmdlist
Initial value:= {
{
"getifname",
NULL,
},
{
"getifindex",
NULL,
},
{ 0 }
}
const struct ng_parse_type ng_parse_int32_type
const struct ng_parse_type ng_parse_string_type
Definition at line 127 of file ng_gif.c.
◆ ng_gif_connect
◆ ng_gif_constructor
◆ ng_gif_disconnect
◆ ng_gif_newhook
◆ ng_gif_rcvdata
◆ ng_gif_rcvmsg
◆ ng_gif_shutdown
◆ ng_gif_typestruct
Initial value:= {
}
static int ng_gif_mod_event(module_t mod, int event, void *data)
static ng_newhook_t ng_gif_newhook
static ng_shutdown_t ng_gif_shutdown
static ng_connect_t ng_gif_connect
static ng_disconnect_t ng_gif_disconnect
static ng_rcvmsg_t ng_gif_rcvmsg
static ng_constructor_t ng_gif_constructor
static ng_rcvdata_t ng_gif_rcvdata
static const struct ng_cmdlist ng_gif_cmdlist[]
Definition at line 145 of file ng_gif.c.
Referenced by ng_gif_attach().