Changeset 13730 in vbox
- Timestamp:
- Nov 1, 2008 4:09:13 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 38700
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/VBox/HostDrivers/VBoxNetFlt/Makefile.kmk ¶
r13725 r13730 142 142 $(PATH_SUB_CURRENT) 143 143 vboxnetflt_LDFLAGS.solaris += -N drv/vboxdrv 144 ifdef VBOXNETFLT_SOLARIS_USE_NETINFO 145 vboxnetflt_DEFS.solaris += VBOXNETFLT_SOLARIS_USE_NETINFO 146 vboxnetflt_LDFLAGS.solaris += -N misc/neti 147 endif 144 148 vboxnetflt_LIBS = \ 145 149 $(PATH_LIB)/SUPR0IdcClient$(VBOX_SUFF_LIB) -
TabularUnified trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c ¶
r13654 r13730 55 55 #include <sys/sunddi.h> 56 56 #include <sys/sunldi.h> 57 58 /* 59 * Experimental: Using netinfo interfaces and queuing out packets. 60 * This is for playing better with IPFilter. 61 */ 62 #undef VBOXNETFLT_SOLARIS_USE_NETINFO 63 #ifdef VBOXNETFLT_SOLARIS_USE_NETINFO 64 # include <sys/neti.h> 65 #endif 57 66 58 67 // Workaround for very strange define in sys/user.h … … 2047 2056 2048 2057 /* 2049 * Inject/Eject from the host IP stack.2058 * Inject/Eject from the host IPv6 stack. 2050 2059 */ 2051 2060 rc = strioctl(pIp6VNode, fAttach ? _I_INSERT : _I_REMOVE, (intptr_t)&StrMod, 0, K_TO_K, … … 3148 3157 if (fDst & INTNETTRUNKDIR_WIRE) 3149 3158 { 3159 #ifdef VBOXNETFLT_SOLARIS_USE_NETINFO 3160 netstack_t *pNetStack = netstack_get_current(); 3161 if (pNetStack) 3162 { 3163 net_data_t pNetData = net_lookup_impl(NHF_INET, pNetStack); 3164 if (pNetData) 3165 { 3166 phy_if_t pInterface = net_phylookup(pNetData, pThis->szName); 3167 if (pInterface) 3168 { 3169 net_inject_t InjectData; 3170 InjectData.ni_packet = pMsg; 3171 InjectData.ni_physical = pInterface; 3172 bzero(&InjectData.ni_addr, sizeof(InjectData.ni_addr)); 3173 InjectData.ni_addr.ss_family = AF_INET; 3174 3175 /* 3176 * Queue out rather than direct out transmission. 3177 */ 3178 int rc = net_inject(pNetData, NI_QUEUE_OUT, &InjectData); 3179 if (!rc) 3180 rc = VINF_SUCCESS; 3181 else 3182 { 3183 LogRel((DEVICE_NAME ":queuing IP packet for transmission failed. rc=%d\n", rc)); 3184 rc = VERR_NET_IO_ERROR; 3185 } 3186 } 3187 else 3188 LogRel((DEVICE_NAME ":vboxNetFltPortOsXmit failed to lookup physical interface.\n")); 3189 } 3190 else 3191 LogRel((DEVICE_NAME ":vboxNetFltPortOsXmit failed to get IP hooks.\n")); 3192 netstack_rele(pNetStack); 3193 } 3194 else 3195 LogRel((DEVICE_NAME ":vboxNetFltPortOsXmit failed to get current net stack.\n")); 3196 #else 3150 3197 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.pvPromiscStream); 3151 3198 if (RT_LIKELY(pPromiscStream)) … … 3165 3212 } 3166 3213 } 3214 #endif 3215 3167 3216 } 3168 3217
Note:
See TracChangeset
for help on using the changeset viewer.