Switch to using C99 sparse initialisers for the type methods array.
Should make no binary difference. Submitted by: Gleb Smirnoff <glebius@cell.sick.ru> Reviewed by: Harti Brandt <harti@freebsd.org> MFC after: 1 week
This commit is contained in:
parent
ad7df741c9
commit
f8aae7776f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129823
@ -227,18 +227,15 @@ static ng_rcvdata_t ngar_rcvdata;
|
||||
static ng_disconnect_t ngar_disconnect;
|
||||
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_AR_NODE_TYPE,
|
||||
NULL,
|
||||
ngar_constructor,
|
||||
ngar_rcvmsg,
|
||||
ngar_shutdown,
|
||||
ngar_newhook,
|
||||
NULL,
|
||||
ngar_connect,
|
||||
ngar_rcvdata,
|
||||
ngar_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_AR_NODE_TYPE,
|
||||
.constructor = ngar_constructor,
|
||||
.rcvmsg = ngar_rcvmsg,
|
||||
.shutdown = ngar_shutdown,
|
||||
.newhook = ngar_newhook,
|
||||
.connect = ngar_connect,
|
||||
.rcvdata = ngar_rcvdata,
|
||||
.disconnect = ngar_disconnect,
|
||||
};
|
||||
|
||||
static int ngar_done_init = 0;
|
||||
|
@ -274,18 +274,15 @@ static ng_rcvdata_t musycc_rcvdata;
|
||||
static ng_disconnect_t musycc_disconnect;
|
||||
|
||||
static struct ng_type ngtypestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_NODETYPE,
|
||||
NULL,
|
||||
musycc_constructor,
|
||||
musycc_rcvmsg,
|
||||
musycc_shutdown,
|
||||
musycc_newhook,
|
||||
NULL,
|
||||
musycc_connect,
|
||||
musycc_rcvdata,
|
||||
musycc_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_NODETYPE,
|
||||
.constructor = musycc_constructor,
|
||||
.rcvmsg = musycc_rcvmsg,
|
||||
.shutdown = musycc_shutdown,
|
||||
.newhook = musycc_newhook,
|
||||
.connect = musycc_connect,
|
||||
.rcvdata = musycc_rcvdata,
|
||||
.disconnect = musycc_disconnect,
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -273,18 +273,15 @@ static ng_rcvdata_t ngsr_rcvdata;
|
||||
static ng_disconnect_t ngsr_disconnect;
|
||||
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SR_NODE_TYPE,
|
||||
NULL,
|
||||
ngsr_constructor,
|
||||
ngsr_rcvmsg,
|
||||
ngsr_shutdown,
|
||||
ngsr_newhook,
|
||||
NULL,
|
||||
ngsr_connect,
|
||||
ngsr_rcvdata,
|
||||
ngsr_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SR_NODE_TYPE,
|
||||
.constructor = ngsr_constructor,
|
||||
.rcvmsg = ngsr_rcvmsg,
|
||||
.shutdown = ngsr_shutdown,
|
||||
.newhook = ngsr_newhook,
|
||||
.connect = ngsr_connect,
|
||||
.rcvdata = ngsr_rcvdata,
|
||||
.disconnect = ngsr_disconnect,
|
||||
};
|
||||
|
||||
static int ngsr_done_init = 0;
|
||||
|
@ -196,18 +196,16 @@ Static const struct ng_cmdlist ng_udbp_cmdlist[] = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
Static struct ng_type ng_udbp_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_UDBP_NODE_TYPE,
|
||||
NULL,
|
||||
ng_udbp_constructor,
|
||||
ng_udbp_rcvmsg,
|
||||
ng_udbp_rmnode,
|
||||
ng_udbp_newhook,
|
||||
NULL,
|
||||
ng_udbp_connect,
|
||||
ng_udbp_rcvdata,
|
||||
ng_udbp_disconnect,
|
||||
ng_udbp_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_UDBP_NODE_TYPE,
|
||||
.constructor = ng_udbp_constructor,
|
||||
.rcvmsg = ng_udbp_rcvmsg,
|
||||
.shutdown = ng_udbp_rmnode,
|
||||
.newhook = ng_udbp_newhook,
|
||||
.connect = ng_udbp_connect,
|
||||
.rcvdata = ng_udbp_rcvdata,
|
||||
.disconnect = ng_udbp_disconnect,
|
||||
.cmdlist = ng_udbp_cmdlist,
|
||||
};
|
||||
|
||||
Static int udbp_setup_in_transfer (udbp_p sc);
|
||||
|
@ -198,18 +198,16 @@ static const struct ng_cmdlist ng_ing_cmdlist[] = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ING_NODE_TYPE,
|
||||
NULL,
|
||||
ng_ing_constructor,
|
||||
ng_ing_rcvmsg,
|
||||
ng_ing_shutdown,
|
||||
ng_ing_newhook,
|
||||
NULL,
|
||||
ng_ing_connect,
|
||||
ng_ing_rcvdata,
|
||||
ng_ing_disconnect,
|
||||
ng_ing_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ING_NODE_TYPE,
|
||||
.constructor = ng_ing_constructor,
|
||||
.rcvmsg = ng_ing_rcvmsg,
|
||||
.shutdown = ng_ing_shutdown,
|
||||
.newhook = ng_ing_newhook,
|
||||
.connect = ng_ing_connect,
|
||||
.rcvdata = ng_ing_rcvdata,
|
||||
.disconnect = ng_ing_disconnect,
|
||||
.cmdlist = ng_ing_cmdlist,
|
||||
};
|
||||
|
||||
NETGRAPH_INIT_ORDERED(ing, &typestruct, SI_SUB_DRIVERS, SI_ORDER_ANY);
|
||||
|
@ -199,18 +199,16 @@ static int ng_atmpif_mod_event(module_t, int, void *);
|
||||
* Node type descriptor
|
||||
*/
|
||||
static struct ng_type ng_atmpif_typestruct = {
|
||||
NG_ABI_VERSION, /* version */
|
||||
NG_ATMPIF_NODE_TYPE, /* name */
|
||||
ng_atmpif_mod_event, /* mod_event */
|
||||
ng_atmpif_constructor, /* constructor */
|
||||
ng_atmpif_rcvmsg, /* rcvmsg */
|
||||
ng_atmpif_rmnode, /* shutdown */
|
||||
ng_atmpif_newhook, /* newhook */
|
||||
NULL, /* findhook */
|
||||
NULL, /* connect */
|
||||
ng_atmpif_rcvdata, /* rcvdata */
|
||||
ng_atmpif_disconnect, /* disconnect */
|
||||
ng_atmpif_cmdlist, /* cmdlist */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ATMPIF_NODE_TYPE,
|
||||
.mod_event = ng_atmpif_mod_event,
|
||||
.constructor = ng_atmpif_constructor,
|
||||
.rcvmsg = ng_atmpif_rcvmsg,
|
||||
.shutdown = ng_atmpif_rmnode,
|
||||
.newhook = ng_atmpif_newhook,
|
||||
.rcvdata = ng_atmpif_rcvdata,
|
||||
.disconnect = ng_atmpif_disconnect,
|
||||
.cmdlist = ng_atmpif_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(atmpif, &ng_atmpif_typestruct);
|
||||
|
||||
|
@ -324,18 +324,17 @@ static ng_rcvdata_t ng_atm_rcvdata;
|
||||
static ng_rcvdata_t ng_atm_rcvdrop;
|
||||
|
||||
static struct ng_type ng_atm_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ATM_NODE_TYPE,
|
||||
ng_atm_mod_event, /* Module event handler (optional) */
|
||||
ng_atm_constructor, /* Node constructor */
|
||||
ng_atm_rcvmsg, /* control messages come here */
|
||||
ng_atm_shutdown, /* reset, and free resources */
|
||||
ng_atm_newhook, /* first notification of new hook */
|
||||
NULL, /* findhook */
|
||||
ng_atm_connect, /* connect */
|
||||
ng_atm_rcvdata, /* rcvdata */
|
||||
ng_atm_disconnect, /* notify on disconnect */
|
||||
ng_atm_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ATM_NODE_TYPE,
|
||||
.mod_event = ng_atm_mod_event,
|
||||
.constructor = ng_atm_constructor,
|
||||
.rcvmsg = ng_atm_rcvmsg,
|
||||
.shutdown = ng_atm_shutdown,
|
||||
.newhook = ng_atm_newhook,
|
||||
.connect = ng_atm_connect,
|
||||
.rcvdata = ng_atm_rcvdata,
|
||||
.disconnect = ng_atm_disconnect,
|
||||
.cmdlist = ng_atm_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(atm, &ng_atm_typestruct);
|
||||
|
||||
|
@ -148,18 +148,16 @@ static ng_rcvdata_t ng_sscfu_rcvlower;
|
||||
static int ng_sscfu_mod_event(module_t, int, void *);
|
||||
|
||||
static struct ng_type ng_sscfu_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SSCFU_NODE_TYPE,
|
||||
ng_sscfu_mod_event, /* Module event handler (optional) */
|
||||
ng_sscfu_constructor, /* Node constructor */
|
||||
ng_sscfu_rcvmsg, /* control messages come here */
|
||||
ng_sscfu_shutdown, /* reset, and free resources */
|
||||
ng_sscfu_newhook, /* first notification of new hook */
|
||||
NULL, /* findhook */
|
||||
NULL, /* connect */
|
||||
ng_sscfu_rcvupper, /* rcvdata */
|
||||
ng_sscfu_disconnect, /* notify on disconnect */
|
||||
ng_sscfu_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SSCFU_NODE_TYPE,
|
||||
.mod_event = ng_sscfu_mod_event,
|
||||
.constructor = ng_sscfu_constructor,
|
||||
.rcvmsg = ng_sscfu_rcvmsg,
|
||||
.shutdown = ng_sscfu_shutdown,
|
||||
.newhook = ng_sscfu_newhook,
|
||||
.rcvdata = ng_sscfu_rcvupper,
|
||||
.disconnect = ng_sscfu_disconnect,
|
||||
.cmdlist = ng_sscfu_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(sscfu, &ng_sscfu_typestruct);
|
||||
|
||||
|
@ -196,18 +196,16 @@ static ng_rcvdata_t ng_sscop_rcvmanage;
|
||||
static int ng_sscop_mod_event(module_t, int, void *);
|
||||
|
||||
static struct ng_type ng_sscop_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SSCOP_NODE_TYPE,
|
||||
ng_sscop_mod_event, /* Module event handler (optional) */
|
||||
ng_sscop_constructor, /* Node constructor */
|
||||
ng_sscop_rcvmsg, /* control messages come here */
|
||||
ng_sscop_shutdown, /* reset, and free resources */
|
||||
ng_sscop_newhook, /* first notification of new hook */
|
||||
NULL, /* findhook */
|
||||
NULL, /* connect */
|
||||
ng_sscop_rcvlower, /* rcvdata */
|
||||
ng_sscop_disconnect, /* notify on disconnect */
|
||||
ng_sscop_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SSCOP_NODE_TYPE,
|
||||
.mod_event = ng_sscop_mod_event,
|
||||
.constructor = ng_sscop_constructor,
|
||||
.rcvmsg = ng_sscop_rcvmsg,
|
||||
.shutdown = ng_sscop_shutdown,
|
||||
.newhook = ng_sscop_newhook,
|
||||
.rcvdata = ng_sscop_rcvlower,
|
||||
.disconnect = ng_sscop_disconnect,
|
||||
.cmdlist = ng_sscop_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(sscop, &ng_sscop_typestruct);
|
||||
|
||||
|
@ -185,18 +185,16 @@ static ng_rcvdata_t ng_uni_rcvupper;
|
||||
static int ng_uni_mod_event(module_t, int, void *);
|
||||
|
||||
static struct ng_type ng_uni_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_UNI_NODE_TYPE,
|
||||
ng_uni_mod_event, /* Module event handler (optional) */
|
||||
ng_uni_constructor, /* Node constructor */
|
||||
ng_uni_rcvmsg, /* control messages come here */
|
||||
ng_uni_shutdown, /* reset, and free resources */
|
||||
ng_uni_newhook, /* first notification of new hook */
|
||||
NULL, /* findhook */
|
||||
NULL, /* connect */
|
||||
ng_uni_rcvlower, /* rcvdata */
|
||||
ng_uni_disconnect, /* notify on disconnect */
|
||||
ng_uni_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_UNI_NODE_TYPE,
|
||||
.mod_event = ng_uni_mod_event,
|
||||
.constructor = ng_uni_constructor,
|
||||
.rcvmsg = ng_uni_rcvmsg,
|
||||
.shutdown = ng_uni_shutdown,
|
||||
.newhook = ng_uni_newhook,
|
||||
.rcvdata = ng_uni_rcvlower,
|
||||
.disconnect = ng_uni_disconnect,
|
||||
.cmdlist = ng_uni_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(uni, &ng_uni_typestruct);
|
||||
|
||||
|
@ -76,18 +76,16 @@ static ng_rcvdata_t ng_hci_raw_rcvdata;
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_HCI_NODE_TYPE, /* typename */
|
||||
NULL, /* modevent */
|
||||
ng_hci_constructor, /* constructor */
|
||||
ng_hci_default_rcvmsg, /* control message */
|
||||
ng_hci_shutdown, /* destructor */
|
||||
ng_hci_newhook, /* new hook */
|
||||
NULL, /* findhook */
|
||||
ng_hci_connect, /* connect hook */
|
||||
ng_hci_drv_rcvdata, /* data */
|
||||
ng_hci_disconnect, /* disconnect hook */
|
||||
ng_hci_cmdlist /* node command list */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_HCI_NODE_TYPE,
|
||||
.constructor = ng_hci_constructor,
|
||||
.rcvmsg = ng_hci_default_rcvmsg,
|
||||
.shutdown = ng_hci_shutdown,
|
||||
.newhook = ng_hci_newhook,
|
||||
.connect = ng_hci_connect,
|
||||
.rcvdata = ng_hci_drv_rcvdata,
|
||||
.disconnect = ng_hci_disconnect,
|
||||
.cmdlist = ng_hci_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(hci, &typestruct);
|
||||
MODULE_VERSION(ng_hci, NG_BLUETOOTH_VERSION);
|
||||
|
@ -75,19 +75,17 @@ static ng_rcvmsg_t ng_l2cap_default_rcvmsg;
|
||||
static ng_rcvdata_t ng_l2cap_rcvdata;
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_L2CAP_NODE_TYPE, /* typename */
|
||||
NULL, /* modevent */
|
||||
ng_l2cap_constructor, /* constructor */
|
||||
ng_l2cap_default_rcvmsg,/* control message */
|
||||
ng_l2cap_shutdown, /* destructor */
|
||||
ng_l2cap_newhook, /* new hook */
|
||||
NULL, /* findhook */
|
||||
ng_l2cap_connect, /* connect hook */
|
||||
ng_l2cap_rcvdata, /* data */
|
||||
ng_l2cap_disconnect, /* disconnect hook */
|
||||
ng_l2cap_cmdlist /* node command list */
|
||||
static struct ng_type typestruct = {
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_L2CAP_NODE_TYPE,
|
||||
.constructor = ng_l2cap_constructor,
|
||||
.rcvmsg = ng_l2cap_default_rcvmsg,
|
||||
.shutdown = ng_l2cap_shutdown,
|
||||
.newhook = ng_l2cap_newhook,
|
||||
.connect = ng_l2cap_connect,
|
||||
.rcvdata = ng_l2cap_rcvdata,
|
||||
.disconnect = ng_l2cap_disconnect,
|
||||
.cmdlist = ng_l2cap_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(l2cap, &typestruct);
|
||||
MODULE_VERSION(ng_l2cap, NG_BLUETOOTH_VERSION);
|
||||
|
@ -91,19 +91,16 @@ struct ng_btsocket_hci_raw_sec_filter {
|
||||
};
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_BTSOCKET_HCI_RAW_NODE_TYPE, /* typename */
|
||||
NULL, /* modevent */
|
||||
ng_btsocket_hci_raw_node_constructor, /* constructor */
|
||||
ng_btsocket_hci_raw_node_rcvmsg, /* control message */
|
||||
ng_btsocket_hci_raw_node_shutdown, /* destructor */
|
||||
ng_btsocket_hci_raw_node_newhook, /* new hook */
|
||||
NULL, /* find hook */
|
||||
ng_btsocket_hci_raw_node_connect, /* connect hook */
|
||||
ng_btsocket_hci_raw_node_rcvdata, /* data */
|
||||
ng_btsocket_hci_raw_node_disconnect, /* disconnect hook */
|
||||
NULL /* node command list */
|
||||
static struct ng_type typestruct = {
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_BTSOCKET_HCI_RAW_NODE_TYPE,
|
||||
.constructor = ng_btsocket_hci_raw_node_constructor,
|
||||
.rcvmsg = ng_btsocket_hci_raw_node_rcvmsg,
|
||||
.shutdown = ng_btsocket_hci_raw_node_shutdown,
|
||||
.newhook = ng_btsocket_hci_raw_node_newhook,
|
||||
.connect = ng_btsocket_hci_raw_node_connect,
|
||||
.rcvdata = ng_btsocket_hci_raw_node_rcvdata,
|
||||
.disconnect = ng_btsocket_hci_raw_node_disconnect,
|
||||
};
|
||||
|
||||
/* Globals */
|
||||
|
@ -78,18 +78,15 @@ static void ng_btsocket_l2cap_rtclean (void *, int);
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_BTSOCKET_L2CAP_NODE_TYPE, /* typename */
|
||||
NULL, /* modevent */
|
||||
ng_btsocket_l2cap_node_constructor, /* constructor */
|
||||
ng_btsocket_l2cap_node_rcvmsg, /* control message */
|
||||
ng_btsocket_l2cap_node_shutdown, /* destructor */
|
||||
ng_btsocket_l2cap_node_newhook, /* new hook */
|
||||
NULL, /* find hook */
|
||||
ng_btsocket_l2cap_node_connect, /* connect hook */
|
||||
ng_btsocket_l2cap_node_rcvdata, /* data */
|
||||
ng_btsocket_l2cap_node_disconnect, /* disconnect hook */
|
||||
NULL /* node command list */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_BTSOCKET_L2CAP_NODE_TYPE,
|
||||
.constructor = ng_btsocket_l2cap_node_constructor,
|
||||
.rcvmsg = ng_btsocket_l2cap_node_rcvmsg,
|
||||
.shutdown = ng_btsocket_l2cap_node_shutdown,
|
||||
.newhook = ng_btsocket_l2cap_node_newhook,
|
||||
.connect = ng_btsocket_l2cap_node_connect,
|
||||
.rcvdata = ng_btsocket_l2cap_node_rcvdata,
|
||||
.disconnect = ng_btsocket_l2cap_node_disconnect,
|
||||
};
|
||||
|
||||
/* Globals */
|
||||
|
@ -89,18 +89,15 @@ static int ng_btsocket_l2cap_raw_send_sync_ngmsg
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_BTSOCKET_L2CAP_RAW_NODE_TYPE, /* typename */
|
||||
NULL, /* modevent */
|
||||
ng_btsocket_l2cap_raw_node_constructor, /* constructor */
|
||||
ng_btsocket_l2cap_raw_node_rcvmsg, /* control message */
|
||||
ng_btsocket_l2cap_raw_node_shutdown, /* destructor */
|
||||
ng_btsocket_l2cap_raw_node_newhook, /* new hook */
|
||||
NULL, /* find hook */
|
||||
ng_btsocket_l2cap_raw_node_connect, /* connect hook */
|
||||
ng_btsocket_l2cap_raw_node_rcvdata, /* data */
|
||||
ng_btsocket_l2cap_raw_node_disconnect, /* disconnect hook */
|
||||
NULL /* node command list */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_BTSOCKET_L2CAP_RAW_NODE_TYPE,
|
||||
.constructor = ng_btsocket_l2cap_raw_node_constructor,
|
||||
.rcvmsg = ng_btsocket_l2cap_raw_node_rcvmsg,
|
||||
.shutdown = ng_btsocket_l2cap_raw_node_shutdown,
|
||||
.newhook = ng_btsocket_l2cap_raw_node_newhook,
|
||||
.connect = ng_btsocket_l2cap_raw_node_connect,
|
||||
.rcvdata = ng_btsocket_l2cap_raw_node_rcvdata,
|
||||
.disconnect = ng_btsocket_l2cap_raw_node_disconnect,
|
||||
};
|
||||
|
||||
/* Globals */
|
||||
|
@ -77,18 +77,14 @@ static ng_disconnect_t ng_UI_disconnect;
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_UI_NODE_TYPE,
|
||||
NULL,
|
||||
ng_UI_constructor,
|
||||
ng_UI_rcvmsg,
|
||||
ng_UI_shutdown,
|
||||
ng_UI_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_UI_rcvdata,
|
||||
ng_UI_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_UI_NODE_TYPE,
|
||||
.constructor = ng_UI_constructor,
|
||||
.rcvmsg = ng_UI_rcvmsg,
|
||||
.shutdown = ng_UI_shutdown,
|
||||
.newhook = ng_UI_newhook,
|
||||
.rcvdata = ng_UI_rcvdata,
|
||||
.disconnect = ng_UI_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(UI, &typestruct);
|
||||
|
||||
|
@ -155,18 +155,15 @@ static const struct ng_cmdlist nga_cmdlist[] = {
|
||||
|
||||
/* Define the netgraph node type */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ASYNC_NODE_TYPE,
|
||||
NULL,
|
||||
nga_constructor,
|
||||
nga_rcvmsg,
|
||||
nga_shutdown,
|
||||
nga_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
nga_rcvdata,
|
||||
nga_disconnect,
|
||||
nga_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ASYNC_NODE_TYPE,
|
||||
.constructor = nga_constructor,
|
||||
.rcvmsg = nga_rcvmsg,
|
||||
.shutdown = nga_shutdown,
|
||||
.newhook = nga_newhook,
|
||||
.rcvdata = nga_rcvdata,
|
||||
.disconnect = nga_disconnect,
|
||||
.cmdlist = nga_cmdlist
|
||||
};
|
||||
NETGRAPH_INIT(async, &typestruct);
|
||||
|
||||
|
@ -64,18 +64,14 @@ static ng_rcvdata_t ng_atmllc_rcvdata;
|
||||
static ng_disconnect_t ng_atmllc_disconnect;
|
||||
|
||||
static struct ng_type ng_atmllc_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ATMLLC_NODE_TYPE,
|
||||
NULL,
|
||||
ng_atmllc_constructor,
|
||||
ng_atmllc_rcvmsg,
|
||||
ng_atmllc_shutdown,
|
||||
ng_atmllc_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_atmllc_rcvdata,
|
||||
ng_atmllc_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ATMLLC_NODE_TYPE,
|
||||
.constructor = ng_atmllc_constructor,
|
||||
.rcvmsg = ng_atmllc_rcvmsg,
|
||||
.shutdown = ng_atmllc_shutdown,
|
||||
.newhook = ng_atmllc_newhook,
|
||||
.rcvdata = ng_atmllc_rcvdata,
|
||||
.disconnect = ng_atmllc_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(atmllc, &ng_atmllc_typestruct);
|
||||
|
||||
|
@ -190,18 +190,15 @@ static const struct ng_cmdlist ng_bpf_cmdlist[] = {
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_BPF_NODE_TYPE,
|
||||
NULL,
|
||||
ng_bpf_constructor,
|
||||
ng_bpf_rcvmsg,
|
||||
ng_bpf_shutdown,
|
||||
ng_bpf_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_bpf_rcvdata,
|
||||
ng_bpf_disconnect,
|
||||
ng_bpf_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_BPF_NODE_TYPE,
|
||||
.constructor = ng_bpf_constructor,
|
||||
.rcvmsg = ng_bpf_rcvmsg,
|
||||
.shutdown = ng_bpf_shutdown,
|
||||
.newhook = ng_bpf_newhook,
|
||||
.rcvdata = ng_bpf_rcvdata,
|
||||
.disconnect = ng_bpf_disconnect,
|
||||
.cmdlist = ng_bpf_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(bpf, &typestruct);
|
||||
|
||||
|
@ -271,18 +271,15 @@ static const struct ng_cmdlist ng_bridge_cmdlist[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_bridge_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_BRIDGE_NODE_TYPE,
|
||||
NULL,
|
||||
ng_bridge_constructor,
|
||||
ng_bridge_rcvmsg,
|
||||
ng_bridge_shutdown,
|
||||
ng_bridge_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_bridge_rcvdata,
|
||||
ng_bridge_disconnect,
|
||||
ng_bridge_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_BRIDGE_NODE_TYPE,
|
||||
.constructor = ng_bridge_constructor,
|
||||
.rcvmsg = ng_bridge_rcvmsg,
|
||||
.shutdown = ng_bridge_shutdown,
|
||||
.newhook = ng_bridge_newhook,
|
||||
.rcvdata = ng_bridge_rcvdata,
|
||||
.disconnect = ng_bridge_disconnect,
|
||||
.cmdlist = ng_bridge_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(bridge, &ng_bridge_typestruct);
|
||||
|
||||
|
@ -171,18 +171,15 @@ static const struct ng_cmdlist ng_cisco_cmdlist[] = {
|
||||
|
||||
/* Node type */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_CISCO_NODE_TYPE,
|
||||
NULL,
|
||||
cisco_constructor,
|
||||
cisco_rcvmsg,
|
||||
cisco_shutdown,
|
||||
cisco_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
cisco_rcvdata,
|
||||
cisco_disconnect,
|
||||
ng_cisco_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_CISCO_NODE_TYPE,
|
||||
.constructor = cisco_constructor,
|
||||
.rcvmsg = cisco_rcvmsg,
|
||||
.shutdown = cisco_shutdown,
|
||||
.newhook = cisco_newhook,
|
||||
.rcvdata = cisco_rcvdata,
|
||||
.disconnect = cisco_disconnect,
|
||||
.cmdlist = ng_cisco_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(cisco, &typestruct);
|
||||
|
||||
|
@ -65,18 +65,15 @@ static int get_free_unit(void);
|
||||
|
||||
/* Netgraph type */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION, /* version */
|
||||
NG_DEVICE_NODE_TYPE, /* name */
|
||||
ng_device_mod_event, /* modevent */
|
||||
ng_device_cons, /* constructor */
|
||||
ng_device_rcvmsg, /* receive msg */
|
||||
NULL, /* shutdown */
|
||||
ng_device_newhook, /* newhook */
|
||||
NULL, /* findhook */
|
||||
ng_device_connect, /* connect */
|
||||
ng_device_rcvdata, /* receive data */
|
||||
ng_device_disconnect, /* disconnect */
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_DEVICE_NODE_TYPE,
|
||||
.mod_event = ng_device_mod_event,
|
||||
.constructor = ng_device_cons,
|
||||
.rcvmsg = ng_device_rcvmsg,
|
||||
.newhook = ng_device_newhook,
|
||||
.connect = ng_device_connect,
|
||||
.rcvdata = ng_device_rcvdata,
|
||||
.disconnect = ng_device_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(device, &typestruct);
|
||||
|
||||
|
@ -63,18 +63,12 @@ static ng_disconnect_t nge_disconnect;
|
||||
|
||||
/* Netgraph type */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ECHO_NODE_TYPE,
|
||||
NULL,
|
||||
nge_cons,
|
||||
nge_rcvmsg,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
nge_rcvdata,
|
||||
nge_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ECHO_NODE_TYPE,
|
||||
.constructor = nge_cons,
|
||||
.rcvmsg = nge_rcvmsg,
|
||||
.rcvdata = nge_rcvdata,
|
||||
.disconnect = nge_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(echo, &typestruct);
|
||||
|
||||
|
@ -98,18 +98,16 @@ static ng_disconnect_t ng_eiface_disconnect;
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_EIFACE_NODE_TYPE,
|
||||
NULL,
|
||||
ng_eiface_constructor,
|
||||
ng_eiface_rcvmsg,
|
||||
ng_eiface_rmnode,
|
||||
ng_eiface_newhook,
|
||||
NULL,
|
||||
ng_eiface_connect,
|
||||
ng_eiface_rcvdata,
|
||||
ng_eiface_disconnect,
|
||||
ng_eiface_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_EIFACE_NODE_TYPE,
|
||||
.constructor = ng_eiface_constructor,
|
||||
.rcvmsg = ng_eiface_rcvmsg,
|
||||
.shutdown = ng_eiface_rmnode,
|
||||
.newhook = ng_eiface_newhook,
|
||||
.connect = ng_eiface_connect,
|
||||
.rcvdata = ng_eiface_rcvdata,
|
||||
.disconnect = ng_eiface_disconnect,
|
||||
.cmdlist = ng_eiface_cmdlist
|
||||
};
|
||||
NETGRAPH_INIT(eiface, &typestruct);
|
||||
|
||||
|
@ -112,18 +112,16 @@ static const struct ng_cmdlist ng_etf_cmdlist[] = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ETF_NODE_TYPE,
|
||||
NULL,
|
||||
ng_etf_constructor,
|
||||
ng_etf_rcvmsg,
|
||||
ng_etf_shutdown,
|
||||
ng_etf_newhook,
|
||||
NULL,
|
||||
ng_etf_connect,
|
||||
ng_etf_rcvdata,
|
||||
ng_etf_disconnect,
|
||||
ng_etf_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ETF_NODE_TYPE,
|
||||
.constructor = ng_etf_constructor,
|
||||
.rcvmsg = ng_etf_rcvmsg,
|
||||
.shutdown = ng_etf_shutdown,
|
||||
.newhook = ng_etf_newhook,
|
||||
.connect = ng_etf_connect,
|
||||
.rcvdata = ng_etf_rcvdata,
|
||||
.disconnect = ng_etf_disconnect,
|
||||
.cmdlist = ng_etf_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(etf, &typestruct);
|
||||
|
||||
|
@ -169,18 +169,17 @@ static const struct ng_cmdlist ng_ether_cmdlist[] = {
|
||||
};
|
||||
|
||||
static struct ng_type ng_ether_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ETHER_NODE_TYPE,
|
||||
ng_ether_mod_event,
|
||||
ng_ether_constructor,
|
||||
ng_ether_rcvmsg,
|
||||
ng_ether_shutdown,
|
||||
ng_ether_newhook,
|
||||
NULL,
|
||||
ng_ether_connect,
|
||||
ng_ether_rcvdata,
|
||||
ng_ether_disconnect,
|
||||
ng_ether_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ETHER_NODE_TYPE,
|
||||
.mod_event = ng_ether_mod_event,
|
||||
.constructor = ng_ether_constructor,
|
||||
.rcvmsg = ng_ether_rcvmsg,
|
||||
.shutdown = ng_ether_shutdown,
|
||||
.newhook = ng_ether_newhook,
|
||||
.connect = ng_ether_connect,
|
||||
.rcvdata = ng_ether_rcvdata,
|
||||
.disconnect = ng_ether_disconnect,
|
||||
.cmdlist = ng_ether_cmdlist,
|
||||
};
|
||||
MODULE_VERSION(ng_ether, 1);
|
||||
NETGRAPH_INIT(ether, &ng_ether_typestruct);
|
||||
|
@ -227,18 +227,12 @@ static const struct ng_cmdlist ng_fec_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_FEC_NODE_TYPE,
|
||||
NULL,
|
||||
ng_fec_constructor,
|
||||
ng_fec_rcvmsg,
|
||||
ng_fec_shutdown,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_fec_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_FEC_NODE_TYPE,
|
||||
.constructor = ng_fec_constructor,
|
||||
.rcvmsg = ng_fec_rcvmsg,
|
||||
.shutdown = ng_fec_shutdown,
|
||||
.cmdlist = ng_fec_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(fec, &typestruct);
|
||||
|
||||
|
@ -137,18 +137,13 @@ static int ngfrm_allocate_CTX(sc_p sc, int dlci);
|
||||
|
||||
/* Netgraph type */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_FRAMERELAY_NODE_TYPE,
|
||||
NULL,
|
||||
ngfrm_constructor,
|
||||
NULL,
|
||||
ngfrm_shutdown,
|
||||
ngfrm_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ngfrm_rcvdata,
|
||||
ngfrm_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_FRAMERELAY_NODE_TYPE,
|
||||
.constructor = ngfrm_constructor,
|
||||
.shutdown = ngfrm_shutdown,
|
||||
.newhook = ngfrm_newhook,
|
||||
.rcvdata = ngfrm_rcvdata,
|
||||
.disconnect = ngfrm_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(framerelay, &typestruct);
|
||||
|
||||
|
@ -138,18 +138,17 @@ static const struct ng_cmdlist ng_gif_cmdlist[] = {
|
||||
};
|
||||
|
||||
static struct ng_type ng_gif_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_GIF_NODE_TYPE,
|
||||
ng_gif_mod_event,
|
||||
ng_gif_constructor,
|
||||
ng_gif_rcvmsg,
|
||||
ng_gif_shutdown,
|
||||
ng_gif_newhook,
|
||||
NULL,
|
||||
ng_gif_connect,
|
||||
ng_gif_rcvdata,
|
||||
ng_gif_disconnect,
|
||||
ng_gif_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_GIF_NODE_TYPE,
|
||||
.mod_event = ng_gif_mod_event,
|
||||
.constructor = ng_gif_constructor,
|
||||
.rcvmsg = ng_gif_rcvmsg,
|
||||
.shutdown = ng_gif_shutdown,
|
||||
.newhook = ng_gif_newhook,
|
||||
.connect = ng_gif_connect,
|
||||
.rcvdata = ng_gif_rcvdata,
|
||||
.disconnect = ng_gif_disconnect,
|
||||
.cmdlist = ng_gif_cmdlist,
|
||||
};
|
||||
MODULE_VERSION(ng_gif, 1);
|
||||
MODULE_DEPEND(ng_gif, if_gif, 1,1,1);
|
||||
|
@ -144,18 +144,15 @@ static const struct ng_cmdlist ng_gif_demux_cmdlist[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_gif_demux_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_GIF_DEMUX_NODE_TYPE,
|
||||
NULL,
|
||||
ng_gif_demux_constructor,
|
||||
ng_gif_demux_rcvmsg,
|
||||
ng_gif_demux_shutdown,
|
||||
ng_gif_demux_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_gif_demux_rcvdata,
|
||||
ng_gif_demux_disconnect,
|
||||
ng_gif_demux_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_GIF_DEMUX_NODE_TYPE,
|
||||
.constructor = ng_gif_demux_constructor,
|
||||
.rcvmsg = ng_gif_demux_rcvmsg,
|
||||
.shutdown = ng_gif_demux_shutdown,
|
||||
.newhook = ng_gif_demux_newhook,
|
||||
.rcvdata = ng_gif_demux_rcvdata,
|
||||
.disconnect = ng_gif_demux_disconnect,
|
||||
.cmdlist = ng_gif_demux_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(gif_demux, &ng_gif_demux_typestruct);
|
||||
|
||||
|
@ -102,18 +102,14 @@ static ng_rcvdata_t ngh_rcvdata;
|
||||
static ng_disconnect_t ngh_disconnect;
|
||||
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_HOLE_NODE_TYPE,
|
||||
NULL, /* modeventhand_t */
|
||||
ngh_cons, /* ng_constructor_t */
|
||||
ngh_rcvmsg, /* ng_rcvmsg_t */
|
||||
NULL, /* ng_shutdown_t */
|
||||
ngh_newhook, /* ng_newhook_t */
|
||||
NULL, /* ng_findhook_t */
|
||||
NULL, /* ng_connect_t */
|
||||
ngh_rcvdata, /* ng_rcvdata_t */
|
||||
ngh_disconnect, /* ng_disconnect_t */
|
||||
ng_hole_cmdlist /* ng_cmdlist */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_HOLE_NODE_TYPE,
|
||||
.constructor = ngh_cons,
|
||||
.rcvmsg = ngh_rcvmsg,
|
||||
.newhook = ngh_newhook,
|
||||
.rcvdata = ngh_rcvdata,
|
||||
.disconnect = ngh_disconnect,
|
||||
.cmdlist = ng_hole_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(hole, &typestruct);
|
||||
|
||||
|
@ -198,18 +198,15 @@ static const struct ng_cmdlist ng_iface_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_IFACE_NODE_TYPE,
|
||||
NULL,
|
||||
ng_iface_constructor,
|
||||
ng_iface_rcvmsg,
|
||||
ng_iface_shutdown,
|
||||
ng_iface_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_iface_rcvdata,
|
||||
ng_iface_disconnect,
|
||||
ng_iface_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_IFACE_NODE_TYPE,
|
||||
.constructor = ng_iface_constructor,
|
||||
.rcvmsg = ng_iface_rcvmsg,
|
||||
.shutdown = ng_iface_shutdown,
|
||||
.newhook = ng_iface_newhook,
|
||||
.rcvdata = ng_iface_rcvdata,
|
||||
.disconnect = ng_iface_disconnect,
|
||||
.cmdlist = ng_iface_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(iface, &typestruct);
|
||||
|
||||
|
@ -91,18 +91,11 @@ static ng_rcvdata_t ngipi_rcvdata;
|
||||
static ng_disconnect_t ngipi_disconnect;
|
||||
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_IP_INPUT_NODE_TYPE,
|
||||
NULL, /* modeventhand_t */
|
||||
ngipi_cons, /* ng_constructor_t */
|
||||
NULL, /* ng_rcvmsg_t */
|
||||
NULL, /* ng_shutdown_t */
|
||||
NULL, /* ng_newhook_t */
|
||||
NULL, /* ng_findhook_t */
|
||||
NULL, /* ng_connect_t */
|
||||
ngipi_rcvdata, /* ng_rcvdata_t */
|
||||
ngipi_disconnect, /* ng_disconnect_t */
|
||||
NULL /* ng_cmdlist */
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_IP_INPUT_NODE_TYPE,
|
||||
.constructor = ngipi_cons,
|
||||
.rcvdata = ngipi_rcvdata,
|
||||
.disconnect = ngipi_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(ip_input, &typestruct);
|
||||
|
||||
|
@ -492,18 +492,16 @@ static const struct ng_cmdlist ng_ksocket_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_ksocket_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_KSOCKET_NODE_TYPE,
|
||||
NULL,
|
||||
ng_ksocket_constructor,
|
||||
ng_ksocket_rcvmsg,
|
||||
ng_ksocket_shutdown,
|
||||
ng_ksocket_newhook,
|
||||
NULL,
|
||||
ng_ksocket_connect,
|
||||
ng_ksocket_rcvdata,
|
||||
ng_ksocket_disconnect,
|
||||
ng_ksocket_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_KSOCKET_NODE_TYPE,
|
||||
.constructor = ng_ksocket_constructor,
|
||||
.rcvmsg = ng_ksocket_rcvmsg,
|
||||
.shutdown = ng_ksocket_shutdown,
|
||||
.newhook = ng_ksocket_newhook,
|
||||
.connect = ng_ksocket_connect,
|
||||
.rcvdata = ng_ksocket_rcvdata,
|
||||
.disconnect = ng_ksocket_disconnect,
|
||||
.cmdlist = ng_ksocket_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(ksocket, &ng_ksocket_typestruct);
|
||||
|
||||
|
@ -274,18 +274,15 @@ static const struct ng_cmdlist ng_l2tp_cmdlist[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_l2tp_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_L2TP_NODE_TYPE,
|
||||
NULL,
|
||||
ng_l2tp_constructor,
|
||||
ng_l2tp_rcvmsg,
|
||||
ng_l2tp_shutdown,
|
||||
ng_l2tp_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_l2tp_rcvdata,
|
||||
ng_l2tp_disconnect,
|
||||
ng_l2tp_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_L2TP_NODE_TYPE,
|
||||
.constructor = ng_l2tp_constructor,
|
||||
.rcvmsg = ng_l2tp_rcvmsg,
|
||||
.shutdown = ng_l2tp_shutdown,
|
||||
.newhook = ng_l2tp_newhook,
|
||||
.rcvdata = ng_l2tp_rcvdata,
|
||||
.disconnect = ng_l2tp_disconnect,
|
||||
.cmdlist = ng_l2tp_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(l2tp, &ng_l2tp_typestruct);
|
||||
|
||||
|
@ -98,18 +98,14 @@ static ng_disconnect_t nglmi_disconnect;
|
||||
static int nglmi_checkdata(hook_p hook, struct mbuf *m);
|
||||
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_LMI_NODE_TYPE,
|
||||
NULL,
|
||||
nglmi_constructor,
|
||||
nglmi_rcvmsg,
|
||||
nglmi_shutdown,
|
||||
nglmi_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
nglmi_rcvdata,
|
||||
nglmi_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_LMI_NODE_TYPE,
|
||||
.constructor = nglmi_constructor,
|
||||
.rcvmsg = nglmi_rcvmsg,
|
||||
.shutdown = nglmi_shutdown,
|
||||
.newhook = nglmi_newhook,
|
||||
.rcvdata = nglmi_rcvdata,
|
||||
.disconnect = nglmi_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(lmi, &typestruct);
|
||||
|
||||
|
@ -155,18 +155,14 @@ static void ng_mppc_reset_req(node_p node);
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_mppc_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_MPPC_NODE_TYPE,
|
||||
NULL,
|
||||
ng_mppc_constructor,
|
||||
ng_mppc_rcvmsg,
|
||||
ng_mppc_shutdown,
|
||||
ng_mppc_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_mppc_rcvdata,
|
||||
ng_mppc_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_MPPC_NODE_TYPE,
|
||||
.constructor = ng_mppc_constructor,
|
||||
.rcvmsg = ng_mppc_rcvmsg,
|
||||
.shutdown = ng_mppc_shutdown,
|
||||
.newhook = ng_mppc_newhook,
|
||||
.rcvdata = ng_mppc_rcvdata,
|
||||
.disconnect = ng_mppc_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(mppc, &ng_mppc_typestruct);
|
||||
|
||||
|
@ -162,18 +162,15 @@ static const struct ng_cmdlist ng_one2many_cmdlist[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_one2many_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_ONE2MANY_NODE_TYPE,
|
||||
NULL,
|
||||
ng_one2many_constructor,
|
||||
ng_one2many_rcvmsg,
|
||||
ng_one2many_shutdown,
|
||||
ng_one2many_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_one2many_rcvdata,
|
||||
ng_one2many_disconnect,
|
||||
ng_one2many_cmdlist,
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_ONE2MANY_NODE_TYPE,
|
||||
.constructor = ng_one2many_constructor,
|
||||
.rcvmsg = ng_one2many_rcvmsg,
|
||||
.shutdown = ng_one2many_shutdown,
|
||||
.newhook = ng_one2many_newhook,
|
||||
.rcvdata = ng_one2many_rcvdata,
|
||||
.disconnect = ng_one2many_disconnect,
|
||||
.cmdlist = ng_one2many_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(one2many, &ng_one2many_typestruct);
|
||||
|
||||
|
@ -349,18 +349,15 @@ static const struct ng_cmdlist ng_ppp_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_ppp_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_PPP_NODE_TYPE,
|
||||
NULL,
|
||||
ng_ppp_constructor,
|
||||
ng_ppp_rcvmsg,
|
||||
ng_ppp_shutdown,
|
||||
ng_ppp_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_ppp_rcvdata,
|
||||
ng_ppp_disconnect,
|
||||
ng_ppp_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_PPP_NODE_TYPE,
|
||||
.constructor = ng_ppp_constructor,
|
||||
.rcvmsg = ng_ppp_rcvmsg,
|
||||
.shutdown = ng_ppp_shutdown,
|
||||
.newhook = ng_ppp_newhook,
|
||||
.rcvdata = ng_ppp_rcvdata,
|
||||
.disconnect = ng_ppp_disconnect,
|
||||
.cmdlist = ng_ppp_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(ppp, &ng_ppp_typestruct);
|
||||
|
||||
|
@ -156,18 +156,16 @@ static const struct ng_cmdlist ng_pppoe_cmds[] = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_PPPOE_NODE_TYPE,
|
||||
NULL,
|
||||
ng_pppoe_constructor,
|
||||
ng_pppoe_rcvmsg,
|
||||
ng_pppoe_shutdown,
|
||||
ng_pppoe_newhook,
|
||||
NULL,
|
||||
ng_pppoe_connect,
|
||||
ng_pppoe_rcvdata,
|
||||
ng_pppoe_disconnect,
|
||||
ng_pppoe_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_PPPOE_NODE_TYPE,
|
||||
.constructor = ng_pppoe_constructor,
|
||||
.rcvmsg = ng_pppoe_rcvmsg,
|
||||
.shutdown = ng_pppoe_shutdown,
|
||||
.newhook = ng_pppoe_newhook,
|
||||
.connect = ng_pppoe_connect,
|
||||
.rcvdata = ng_pppoe_rcvdata,
|
||||
.disconnect = ng_pppoe_disconnect,
|
||||
.cmdlist = ng_pppoe_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(pppoe, &typestruct);
|
||||
/* Depend on ng_ether so we can use the Ethernet parse type */
|
||||
|
@ -248,18 +248,15 @@ static const struct ng_cmdlist ng_pptpgre_cmdlist[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_pptpgre_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_PPTPGRE_NODE_TYPE,
|
||||
NULL,
|
||||
ng_pptpgre_constructor,
|
||||
ng_pptpgre_rcvmsg,
|
||||
ng_pptpgre_shutdown,
|
||||
ng_pptpgre_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_pptpgre_rcvdata,
|
||||
ng_pptpgre_disconnect,
|
||||
ng_pptpgre_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_PPTPGRE_NODE_TYPE,
|
||||
.constructor = ng_pptpgre_constructor,
|
||||
.rcvmsg = ng_pptpgre_rcvmsg,
|
||||
.shutdown = ng_pptpgre_shutdown,
|
||||
.newhook = ng_pptpgre_newhook,
|
||||
.rcvdata = ng_pptpgre_rcvdata,
|
||||
.disconnect = ng_pptpgre_disconnect,
|
||||
.cmdlist = ng_pptpgre_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(pptpgre, &ng_pptpgre_typestruct);
|
||||
|
||||
|
@ -97,18 +97,14 @@ static ng_disconnect_t ng_rfc1490_disconnect;
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_RFC1490_NODE_TYPE,
|
||||
NULL,
|
||||
ng_rfc1490_constructor,
|
||||
ng_rfc1490_rcvmsg,
|
||||
ng_rfc1490_shutdown,
|
||||
ng_rfc1490_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_rfc1490_rcvdata,
|
||||
ng_rfc1490_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_RFC1490_NODE_TYPE,
|
||||
.constructor = ng_rfc1490_constructor,
|
||||
.rcvmsg = ng_rfc1490_rcvmsg,
|
||||
.shutdown = ng_rfc1490_shutdown,
|
||||
.newhook = ng_rfc1490_newhook,
|
||||
.rcvdata = ng_rfc1490_rcvdata,
|
||||
.disconnect = ng_rfc1490_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(rfc1490, &typestruct);
|
||||
|
||||
|
@ -104,18 +104,17 @@ static const struct ng_cmdlist ng_xxx_cmdlist[] = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_XXX_NODE_TYPE,
|
||||
NULL,
|
||||
ng_xxx_constructor,
|
||||
ng_xxx_rcvmsg,
|
||||
ng_xxx_shutdown,
|
||||
ng_xxx_newhook,
|
||||
NULL,
|
||||
ng_xxx_connect,
|
||||
ng_xxx_rcvdata,
|
||||
ng_xxx_disconnect,
|
||||
ng_xxx_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_XXX_NODE_TYPE,
|
||||
.constructor = ng_xxx_constructor,
|
||||
.rcvmsg = ng_xxx_rcvmsg,
|
||||
.shutdown = ng_xxx_shutdown,
|
||||
.newhook = ng_xxx_newhook,
|
||||
/* .findhook = ng_xxx_findhook, */
|
||||
.connect = ng_xxx_connect,
|
||||
.rcvdata = ng_xxx_rcvdata,
|
||||
.disconnect = ng_xxx_disconnect,
|
||||
.cmdlist = ng_xxx_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(xxx, &typestruct);
|
||||
|
||||
|
@ -130,18 +130,16 @@ static int ship_msg(struct ngpcb *pcbp, struct ng_mesg *msg,
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SOCKET_NODE_TYPE,
|
||||
ngs_mod_event,
|
||||
ngs_constructor,
|
||||
ngs_rcvmsg,
|
||||
ngs_shutdown,
|
||||
ngs_newhook,
|
||||
NULL,
|
||||
ngs_connect,
|
||||
ngs_rcvdata,
|
||||
ngs_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SOCKET_NODE_TYPE,
|
||||
.mod_event = ngs_mod_event,
|
||||
.constructor = ngs_constructor,
|
||||
.rcvmsg = ngs_rcvmsg,
|
||||
.shutdown = ngs_shutdown,
|
||||
.newhook = ngs_newhook,
|
||||
.connect = ngs_connect,
|
||||
.rcvdata = ngs_rcvdata,
|
||||
.disconnect = ngs_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(socket, &typestruct);
|
||||
|
||||
|
@ -190,18 +190,15 @@ static const struct ng_cmdlist ng_source_cmds[] = {
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type ng_source_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SOURCE_NODE_TYPE,
|
||||
NULL, /* module event handler */
|
||||
ng_source_constructor,
|
||||
ng_source_rcvmsg,
|
||||
ng_source_rmnode,
|
||||
ng_source_newhook,
|
||||
NULL, /* findhook */
|
||||
NULL, /* connect */
|
||||
ng_source_rcvdata, /* rcvdata */
|
||||
ng_source_disconnect,
|
||||
ng_source_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SOURCE_NODE_TYPE,
|
||||
.constructor = ng_source_constructor,
|
||||
.rcvmsg = ng_source_rcvmsg,
|
||||
.shutdown = ng_source_rmnode,
|
||||
.newhook = ng_source_newhook,
|
||||
.rcvdata = ng_source_rcvdata,
|
||||
.disconnect = ng_source_disconnect,
|
||||
.cmdlist = ng_source_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(source, &ng_source_typestruct);
|
||||
|
||||
|
@ -53,18 +53,13 @@ static ng_disconnect_t ng_split_disconnect;
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SPLIT_NODE_TYPE,
|
||||
NULL,
|
||||
ng_split_constructor,
|
||||
NULL,
|
||||
ng_split_shutdown,
|
||||
ng_split_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_split_rcvdata,
|
||||
ng_split_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SPLIT_NODE_TYPE,
|
||||
.constructor = ng_split_constructor,
|
||||
.shutdown = ng_split_shutdown,
|
||||
.newhook = ng_split_newhook,
|
||||
.rcvdata = ng_split_rcvdata,
|
||||
.disconnect = ng_split_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(ng_split, &typestruct);
|
||||
|
||||
|
@ -92,18 +92,15 @@ static const struct ng_cmdlist ng_sppp_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_SPPP_NODE_TYPE,
|
||||
NULL,
|
||||
ng_sppp_constructor,
|
||||
ng_sppp_rcvmsg,
|
||||
ng_sppp_shutdown,
|
||||
ng_sppp_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_sppp_rcvdata,
|
||||
ng_sppp_disconnect,
|
||||
ng_sppp_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_SPPP_NODE_TYPE,
|
||||
.constructor = ng_sppp_constructor,
|
||||
.rcvmsg = ng_sppp_rcvmsg,
|
||||
.shutdown = ng_sppp_shutdown,
|
||||
.newhook = ng_sppp_newhook,
|
||||
.rcvdata = ng_sppp_rcvdata,
|
||||
.disconnect = ng_sppp_disconnect,
|
||||
.cmdlist = ng_sppp_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(sppp, &typestruct);
|
||||
|
||||
|
@ -128,18 +128,15 @@ static const struct ng_cmdlist ng_tee_cmds[] = {
|
||||
|
||||
/* Netgraph type descriptor */
|
||||
static struct ng_type ng_tee_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_TEE_NODE_TYPE,
|
||||
NULL,
|
||||
ngt_constructor,
|
||||
ngt_rcvmsg,
|
||||
ngt_shutdown,
|
||||
ngt_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ngt_rcvdata,
|
||||
ngt_disconnect,
|
||||
ng_tee_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_TEE_NODE_TYPE,
|
||||
.constructor = ngt_constructor,
|
||||
.rcvmsg = ngt_rcvmsg,
|
||||
.shutdown = ngt_shutdown,
|
||||
.newhook = ngt_newhook,
|
||||
.rcvdata = ngt_rcvdata,
|
||||
.disconnect = ngt_disconnect,
|
||||
.cmdlist = ng_tee_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(tee, &ng_tee_typestruct);
|
||||
|
||||
|
@ -154,18 +154,16 @@ static struct linesw ngt_disc = {
|
||||
|
||||
/* Netgraph node type descriptor */
|
||||
static struct ng_type typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_TTY_NODE_TYPE,
|
||||
ngt_mod_event,
|
||||
ngt_constructor,
|
||||
ngt_rcvmsg,
|
||||
ngt_shutdown,
|
||||
ngt_newhook,
|
||||
NULL,
|
||||
ngt_connect,
|
||||
ngt_rcvdata,
|
||||
ngt_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_TTY_NODE_TYPE,
|
||||
.mod_event = ngt_mod_event,
|
||||
.constructor = ngt_constructor,
|
||||
.rcvmsg = ngt_rcvmsg,
|
||||
.shutdown = ngt_shutdown,
|
||||
.newhook = ngt_newhook,
|
||||
.connect = ngt_connect,
|
||||
.rcvdata = ngt_rcvdata,
|
||||
.disconnect = ngt_disconnect,
|
||||
};
|
||||
NETGRAPH_INIT(tty, &typestruct);
|
||||
|
||||
|
@ -218,18 +218,15 @@ static const struct ng_cmdlist ng_vjc_cmds[] = {
|
||||
|
||||
/* Node type descriptor */
|
||||
static struct ng_type ng_vjc_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_VJC_NODE_TYPE,
|
||||
NULL,
|
||||
ng_vjc_constructor,
|
||||
ng_vjc_rcvmsg,
|
||||
ng_vjc_shutdown,
|
||||
ng_vjc_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_vjc_rcvdata,
|
||||
ng_vjc_disconnect,
|
||||
ng_vjc_cmds
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_VJC_NODE_TYPE,
|
||||
.constructor = ng_vjc_constructor,
|
||||
.rcvmsg = ng_vjc_rcvmsg,
|
||||
.shutdown = ng_vjc_shutdown,
|
||||
.newhook = ng_vjc_newhook,
|
||||
.rcvdata = ng_vjc_rcvdata,
|
||||
.disconnect = ng_vjc_disconnect,
|
||||
.cmdlist = ng_vjc_cmds,
|
||||
};
|
||||
NETGRAPH_INIT(vjc, &ng_vjc_typestruct);
|
||||
|
||||
|
@ -114,18 +114,15 @@ static const struct ng_cmdlist ng_vlan_cmdlist[] = {
|
||||
};
|
||||
|
||||
static struct ng_type ng_vlan_typestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_VLAN_NODE_TYPE,
|
||||
NULL,
|
||||
ng_vlan_constructor,
|
||||
ng_vlan_rcvmsg,
|
||||
ng_vlan_shutdown,
|
||||
ng_vlan_newhook,
|
||||
NULL,
|
||||
NULL,
|
||||
ng_vlan_rcvdata,
|
||||
ng_vlan_disconnect,
|
||||
ng_vlan_cmdlist
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_VLAN_NODE_TYPE,
|
||||
.constructor = ng_vlan_constructor,
|
||||
.rcvmsg = ng_vlan_rcvmsg,
|
||||
.shutdown = ng_vlan_shutdown,
|
||||
.newhook = ng_vlan_newhook,
|
||||
.rcvdata = ng_vlan_rcvdata,
|
||||
.disconnect = ng_vlan_disconnect,
|
||||
.cmdlist = ng_vlan_cmdlist,
|
||||
};
|
||||
NETGRAPH_INIT(vlan, &ng_vlan_typestruct);
|
||||
|
||||
|
@ -189,18 +189,15 @@ static ng_rcvdata_t ngmn_rcvdata;
|
||||
static ng_disconnect_t ngmn_disconnect;
|
||||
|
||||
static struct ng_type mntypestruct = {
|
||||
NG_ABI_VERSION,
|
||||
NG_MN_NODE_TYPE,
|
||||
NULL,
|
||||
ngmn_constructor,
|
||||
ngmn_rcvmsg,
|
||||
ngmn_shutdown,
|
||||
ngmn_newhook,
|
||||
NULL,
|
||||
ngmn_connect,
|
||||
ngmn_rcvdata,
|
||||
ngmn_disconnect,
|
||||
NULL
|
||||
.version = NG_ABI_VERSION,
|
||||
.name = NG_MN_NODE_TYPE,
|
||||
.constructor = ngmn_constructor,
|
||||
.rcvmsg = ngmn_rcvmsg,
|
||||
.shutdown = ngmn_shutdown,
|
||||
.newhook = ngmn_newhook,
|
||||
.connect = ngmn_connect,
|
||||
.rcvdata = ngmn_rcvdata,
|
||||
.disconnect = ngmn_disconnect,
|
||||
};
|
||||
|
||||
static MALLOC_DEFINE(M_MN, "mn", "Mx driver related");
|
||||
|
Loading…
Reference in New Issue
Block a user