- Timestamp:
- Nov 21, 2013 10:36:22 AM (11 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r46035 r49598 651 651 LogRel(("TAP#%d: Failed to get interface flags after setting PPA. errno=%d\n", pThis->pDrvIns->iInstance, errno)); 652 652 653 # ifdef VBOX_SOLARIS_TAP_ARP653 # ifdef VBOX_SOLARIS_TAP_ARP 654 654 /* Interface */ 655 655 if (ioctl(InterfaceFD, I_PUSH, "arp") == -1) … … 677 677 if (ioctl(ARPFileDes, I_STR, &ioIF) == -1) 678 678 LogRel(("TAP#%d: Failed to set interface name to ARP.\n", pThis->pDrvIns->iInstance)); 679 # endif679 # endif 680 680 681 681 /* We must use I_LINK and not I_PLINK as I_PLINK makes the link persistent. … … 687 687 { 688 688 close(InterfaceFD); 689 # ifdef VBOX_SOLARIS_TAP_ARP689 # ifdef VBOX_SOLARIS_TAP_ARP 690 690 close(ARPFileDes); 691 # endif691 # endif 692 692 LogRel(("TAP#%d: Cannot link TAP device to IP.\n", pThis->pDrvIns->iInstance)); 693 693 return PDMDrvHlpVMSetError(pThis->pDrvIns, VERR_HOSTIF_IOCTL, RT_SRC_POS, … … 695 695 } 696 696 697 # ifdef VBOX_SOLARIS_TAP_ARP697 # ifdef VBOX_SOLARIS_TAP_ARP 698 698 int ARPMuxID = ioctl(IPFileDes, I_LINK, ARPFileDes); 699 699 if (ARPMuxID == -1) … … 701 701 702 702 close(ARPFileDes); 703 # endif703 # endif 704 704 close(InterfaceFD); 705 705 … … 708 708 RTStrCopy(ifReq.lifr_name, sizeof(ifReq.lifr_name), pThis->pszDeviceName); 709 709 ifReq.lifr_ip_muxid = IPMuxID; 710 # ifdef VBOX_SOLARIS_TAP_ARP710 # ifdef VBOX_SOLARIS_TAP_ARP 711 711 ifReq.lifr_arp_muxid = ARPMuxID; 712 # endif712 # endif 713 713 714 714 if (ioctl(IPFileDes, SIOCSLIFMUXID, &ifReq) == -1) 715 715 { 716 # ifdef VBOX_SOLARIS_TAP_ARP716 # ifdef VBOX_SOLARIS_TAP_ARP 717 717 ioctl(IPFileDes, I_PUNLINK, ARPMuxID); 718 # endif718 # endif 719 719 ioctl(IPFileDes, I_PUNLINK, IPMuxID); 720 720 close(IPFileDes); … … 726 726 int rc = RTFileFromNative(&pThis->hFileDevice, TapFileDes); 727 727 AssertLogRelRC(rc); 728 if (RT_FAILURE(rc)) )728 if (RT_FAILURE(rc)) 729 729 { 730 730 close(IPFileDes); … … 978 978 N_("Configuration error: Failed to configure /dev/net/tun. errno=%d"), errno); 979 979 /** @todo determine device name. This can be done by reading the link /proc/<pid>/fd/<fd> */ 980 Log(("drvTAPContruct: %d (from fd)\n", pThis->hFileDevice));980 Log(("drvTAPContruct: %d (from fd)\n", (intptr_t)pThis->hFileDevice)); 981 981 rc = VINF_SUCCESS; 982 982 -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r49471 r49598 8487 8487 RTStrCopy(IfReq.ifr_name, sizeof(IfReq.ifr_name), str.c_str()); /** @todo bitch about names which are too long... */ 8488 8488 IfReq.ifr_flags = IFF_TAP | IFF_NO_PI; 8489 rcVBox = ioctl( maTapFD[slot], TUNSETIFF, &IfReq);8489 rcVBox = ioctl(RTFileToNative(maTapFD[slot]), TUNSETIFF, &IfReq); 8490 8490 if (rcVBox != 0) 8491 8491 { … … 8501 8501 * Make it pollable. 8502 8502 */ 8503 if (fcntl( maTapFD[slot], F_SETFL, O_NONBLOCK) != -1)8503 if (fcntl(RTFileToNative(maTapFD[slot]), F_SETFL, O_NONBLOCK) != -1) 8504 8504 { 8505 8505 Log(("attachToTapInterface: %RTfile %ls\n", maTapFD[slot], tapDeviceName.raw())); -
trunk/src/VBox/Main/src-client/ConsoleImpl2.cpp
r49588 r49598 4372 4372 } 4373 4373 4374 Assert((int )maTapFD[uInstance] >= 0);4375 if ((int )maTapFD[uInstance] >= 0)4374 Assert((intptr_t)maTapFD[uInstance] >= 0); 4375 if ((intptr_t)maTapFD[uInstance] >= 0) 4376 4376 { 4377 4377 InsertConfigString(pLunL0, "Driver", "HostInterface"); 4378 4378 InsertConfigNode(pLunL0, "Config", &pCfg); 4379 InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);4379 InsertConfigInteger(pCfg, "FileHandle", (intptr_t)maTapFD[uInstance]); 4380 4380 } 4381 4381 … … 4571 4571 } 4572 4572 4573 Assert((int )maTapFD[uInstance] >= 0);4574 if ((int )maTapFD[uInstance] >= 0)4573 Assert((intptr_t)maTapFD[uInstance] >= 0); 4574 if ((intptr_t)maTapFD[uInstance] >= 0) 4575 4575 { 4576 4576 InsertConfigString(pLunL0, "Driver", "HostInterface"); 4577 4577 InsertConfigNode(pLunL0, "Config", &pCfg); 4578 InsertConfigInteger(pCfg, "FileHandle", maTapFD[uInstance]);4578 InsertConfigInteger(pCfg, "FileHandle", (intptr_t)maTapFD[uInstance]); 4579 4579 } 4580 4580 break;
Note:
See TracChangeset
for help on using the changeset viewer.