Changeset 58070 in vbox for trunk/src/VBox/HostDrivers/VBoxNetAdp
- Timestamp:
- Oct 7, 2015 12:45:41 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 103126
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetAdp/darwin/VBoxNetAdp-darwin.cpp
r57913 r58070 220 220 errno_t error = 0; 221 221 222 switch (uCmd)222 if (pvData == NULL) 223 223 { 224 224 /* 225 * Common pattern in the kernel code is: 225 * Common pattern in the kernel code is to make changes in the 226 * net layer and then notify the device driver by calling its 227 * ioctl function with NULL parameter, e.g.: 228 * 226 229 * ifnet_set_flags(interface, ...); 227 230 * ifnet_ioctl(interface, 0, SIOCSIFFLAGS, NULL); 228 231 * 229 * Stub this case out so that VBoxNetFlt-darwin.cpp doesn't 230 * complain that it failed to put vboxnet into promiscuous 231 * mode. 232 * These are no-ops for us, so tell the caller we succeeded 233 * because some callers do check that return value. 232 234 */ 233 case SIOCSIFFLAGS: 234 if (pvData != NULL) 235 { 236 error = ENOTSUP; 237 } 238 break; 239 240 default: 241 error = ether_ioctl(pIface, uCmd, pvData); 242 break; 235 switch (uCmd) 236 { 237 case SIOCSIFFLAGS: 238 Log2(("VBoxNetAdp: %s%d: SIOCSIFFLAGS (null): flags = 0x%04hx\n", 239 ifnet_name(pIface), ifnet_unit(pIface), 240 (uint16_t)ifnet_flags(pIface))); 241 return 0; 242 243 case SIOCADDMULTI: 244 case SIOCDELMULTI: 245 Log2(("VBoxNetAdp: %s%d: SIOC%sMULTI (null)\n", 246 ifnet_name(pIface), ifnet_unit(pIface), 247 uCmd == SIOCADDMULTI ? "ADD" : "DEL")); 248 return 0; 249 } 243 250 } 244 251 252 Log2(("VBoxNetAdp: %s%d: %c%c '%c' %u len %u\n", 253 ifnet_name(pIface), ifnet_unit(pIface), 254 uCmd & IOC_OUT ? '<' : '-', 255 uCmd & IOC_IN ? '>' : '-', 256 IOCGROUP(uCmd), 257 uCmd & 0xff, 258 IOCPARM_LEN(uCmd))); 259 260 error = ether_ioctl(pIface, uCmd, pvData); 245 261 return error; 246 262 }
Note:
See TracChangeset
for help on using the changeset viewer.