Changeset 22277 in vbox for trunk/src/VBox/Devices/Network/DrvTAP.cpp
- Timestamp:
- Aug 16, 2009 9:12:50 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 51119
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DrvTAP.cpp
r20708 r22277 882 882 * Construct a TAP network transport driver instance. 883 883 * 884 * @returns VBox status. 885 * @param pDrvIns The driver instance data. 886 * If the registration structure is needed, pDrvIns->pDrvReg points to it. 887 * @param pCfgHandle Configuration node handle for the driver. Use this to obtain the configuration 888 * of the driver instance. It's also found in pDrvIns->pCfgHandle, but like 889 * iInstance it's expected to be used a bit in this function. 890 */ 891 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle) 884 * @copydoc FNPDMDRVCONSTRUCT 885 */ 886 static DECLCALLBACK(int) drvTAPConstruct(PPDMDRVINS pDrvIns, PCFGMNODE pCfgHandle, uint32_t fFlags) 892 887 { 893 888 PDRVTAP pThis = PDMINS_2_DATA(pDrvIns, PDRVTAP); … … 926 921 * Check that no-one is attached to us. 927 922 */ 928 int rc = pDrvIns->pDrvHlp->pfnAttach(pDrvIns, NULL); 929 if (rc != VERR_PDM_NO_ATTACHED_DRIVER) 930 return PDMDRV_SET_ERROR(pDrvIns, VERR_PDM_DRVINS_NO_ATTACH, 931 N_("Configuration error: Cannot attach drivers to the TAP driver")); 923 AssertMsgReturn(PDMDrvHlpNoAttach(pDrvIns) == VERR_PDM_NO_ATTACHED_DRIVER, 924 ("Configuration error: Not possible to attach anything to this driver!\n"), 925 VERR_PDM_DRVINS_NO_ATTACH); 932 926 933 927 /* … … 942 936 * Read the configuration. 943 937 */ 938 int rc; 944 939 #if defined(RT_OS_SOLARIS) /** @todo Other platforms' TAP code should be moved here from ConsoleImpl & VBoxBFE. */ 945 940 rc = CFGMR3QueryStringAlloc(pCfgHandle, "TAPSetupApplication", &pThis->pszSetupApplication); … … 1096 1091 /* pfnResume */ 1097 1092 NULL, 1093 /* pfnAttach */ 1094 NULL, 1098 1095 /* pfnDetach */ 1096 NULL, 1097 /* pfnPowerOff */ 1098 NULL, 1099 /* pfnSoftReset */ 1099 1100 NULL, 1100 /* pfnPowerOff*/1101 NULL1101 /* u32EndVersion */ 1102 PDM_DRVREG_VERSION 1102 1103 }; 1104
Note:
See TracChangeset
for help on using the changeset viewer.