Changeset 37423 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Jun 12, 2011 6:37:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/freebsd/VBoxNetFlt-freebsd.c
r36385 r37423 84 84 85 85 /** Netgraph node type */ 86 #define NG_VBOXNETFLT_NODE_TYPE "vboxnetflt"86 #define NG_VBOXNETFLT_NODE_TYPE "vboxnetflt" 87 87 /** Netgraph message cookie */ 88 #define NGM_VBOXNETFLT_COOKIE 0x56424f5888 #define NGM_VBOXNETFLT_COOKIE 0x56424f58 89 89 90 90 /** Input netgraph hook name */ 91 #define NG_VBOXNETFLT_HOOK_IN "input"91 #define NG_VBOXNETFLT_HOOK_IN "input" 92 92 /** Output netgraph hook name */ 93 #define NG_VBOXNETFLT_HOOK_OUT "output"93 #define NG_VBOXNETFLT_HOOK_OUT "output" 94 94 95 95 /** mbuf tag identifier */ 96 #define MTAG_VBOX 0x56424f5896 #define MTAG_VBOX 0x56424f58 97 97 /** mbuf packet tag */ 98 #define PACKET_TAG_VBOX 12898 #define PACKET_TAG_VBOX 128 99 99 100 100 #if defined(__FreeBSD_version) && __FreeBSD_version >= 800500 … … 102 102 # include <net/vnet.h> 103 103 104 # define VBOXCURVNET_SET(arg) 105 # define VBOXCURVNET_SET_FROM_UCRED() 106 # define VBOXCURVNET_RESTORE() 104 # define VBOXCURVNET_SET(arg) CURVNET_SET_QUIET(arg) 105 # define VBOXCURVNET_SET_FROM_UCRED() VBOXCURVNET_SET(CRED_TO_VNET(curthread->td_ucred)) 106 # define VBOXCURVNET_RESTORE() CURVNET_RESTORE() 107 107 108 108 #else /* !defined(__FreeBSD_version) || __FreeBSD_version < 800500 */ … … 128 128 static struct ng_type ng_vboxnetflt_typestruct = 129 129 { 130 .version =NG_ABI_VERSION,131 .name =NG_VBOXNETFLT_NODE_TYPE,132 .mod_event =vboxnetflt_modevent,133 .constructor =ng_vboxnetflt_constructor,134 .rcvmsg =ng_vboxnetflt_rcvmsg,135 .shutdown =ng_vboxnetflt_shutdown,136 .newhook =ng_vboxnetflt_newhook,137 .rcvdata =ng_vboxnetflt_rcvdata,138 .disconnect = 139 .cmdlist =ng_vboxnetflt_cmdlist,130 .version = NG_ABI_VERSION, 131 .name = NG_VBOXNETFLT_NODE_TYPE, 132 .mod_event = vboxnetflt_modevent, 133 .constructor= ng_vboxnetflt_constructor, 134 .rcvmsg = ng_vboxnetflt_rcvmsg, 135 .shutdown = ng_vboxnetflt_shutdown, 136 .newhook = ng_vboxnetflt_newhook, 137 .rcvdata = ng_vboxnetflt_rcvdata, 138 .disconnect = ng_vboxnetflt_disconnect, 139 .cmdlist = ng_vboxnetflt_cmdlist, 140 140 }; 141 141 NETGRAPH_INIT(vboxnetflt, &ng_vboxnetflt_typestruct);
Note:
See TracChangeset
for help on using the changeset viewer.