Changeset 26305 in vbox for trunk/src/VBox/Devices/Network/DevPCNet.cpp
- Timestamp:
- Feb 5, 2010 7:00:45 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevPCNet.cpp
r26300 r26305 115 115 * @extends PCIDEVICE 116 116 * @implements PDMIBASE 117 * @implements PDMINETWORK PORT117 * @implements PDMINETWORKDOWN 118 118 * @implements PDMINETWORKCONFIG 119 119 * @implements PDMILEDPORTS … … 204 204 PTMTIMERR3 pTimerRestore; 205 205 /** Pointer to the connector of the attached network driver. */ 206 R3PTRTYPE(PPDMINETWORK CONNECTOR) pDrv;206 R3PTRTYPE(PPDMINETWORKUP) pDrv; 207 207 /** Pointer to the attached network driver. */ 208 208 R3PTRTYPE(PPDMIBASE) pDrvBase; … … 210 210 PDMIBASE IBase; 211 211 /** LUN\#0: The network port interface. */ 212 PDMINETWORK PORT INetworkPort;212 PDMINETWORKDOWN INetworkDown; 213 213 /** LUN\#0: The network config port interface. */ 214 214 PDMINETWORKCONFIG INetworkConfig; … … 2164 2164 pThis->Led.Asserted.s.fWriting = pThis->Led.Actual.s.fWriting = 1; 2165 2165 2166 pThis->pDrv->pfnSend (pThis->pDrv, pThis->pvSendFrame, pThis->cbSendFrame);2166 pThis->pDrv->pfnSendDeprecated(pThis->pDrv, pThis->pvSendFrame, pThis->cbSendFrame); 2167 2167 STAM_REL_COUNTER_ADD(&pThis->StatTransmitBytes, pThis->cbSendFrame); 2168 2168 pThis->Led.Actual.s.fWriting = 0; … … 4488 4488 Assert(&pThis->IBase == pInterface); 4489 4489 PDMIBASE_RETURN_INTERFACE(pszIID, PDMIBASE, &pThis->IBase); 4490 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORK PORT, &pThis->INetworkPort);4490 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKDOWN, &pThis->INetworkDown); 4491 4491 PDMIBASE_RETURN_INTERFACE(pszIID, PDMINETWORKCONFIG, &pThis->INetworkConfig); 4492 4492 PDMIBASE_RETURN_INTERFACE(pszIID, PDMILEDPORTS, &pThis->ILeds); … … 4494 4494 } 4495 4495 4496 /** Converts a pointer to PCNetState::INetwork Portto a PCNetState pointer. */4497 #define INETWORKPORT_2_DATA(pInterface) ( (PCNetState *)((uintptr_t)pInterface - RT_OFFSETOF(PCNetState, INetwork Port)) )4496 /** Converts a pointer to PCNetState::INetworkDown to a PCNetState pointer. */ 4497 #define INETWORKPORT_2_DATA(pInterface) ( (PCNetState *)((uintptr_t)pInterface - RT_OFFSETOF(PCNetState, INetworkDown)) ) 4498 4498 4499 4499 … … 4535 4535 * 4536 4536 */ 4537 static DECLCALLBACK(int) pcnetWaitReceiveAvail(PPDMINETWORK PORTpInterface, RTMSINTERVAL cMillies)4537 static DECLCALLBACK(int) pcnetWaitReceiveAvail(PPDMINETWORKDOWN pInterface, RTMSINTERVAL cMillies) 4538 4538 { 4539 4539 PCNetState *pThis = INETWORKPORT_2_DATA(pInterface); … … 4583 4583 * @thread EMT 4584 4584 */ 4585 static DECLCALLBACK(int) pcnetReceive(PPDMINETWORK PORTpInterface, const void *pvBuf, size_t cb)4585 static DECLCALLBACK(int) pcnetReceive(PPDMINETWORKDOWN pInterface, const void *pvBuf, size_t cb) 4586 4586 { 4587 4587 PCNetState *pThis = INETWORKPORT_2_DATA(pInterface); … … 4820 4820 #endif 4821 4821 } 4822 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORK CONNECTOR);4823 AssertMsgStmt(pThis->pDrv, ("Failed to obtain the PDMINETWORK CONNECTORinterface!\n"),4822 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKUP); 4823 AssertMsgStmt(pThis->pDrv, ("Failed to obtain the PDMINETWORKUP interface!\n"), 4824 4824 rc = VERR_PDM_MISSING_INTERFACE_BELOW); 4825 4825 } … … 5010 5010 pThis->IBase.pfnQueryInterface = pcnetQueryInterface; 5011 5011 /* INeworkPort */ 5012 pThis->INetwork Port.pfnWaitReceiveAvail = pcnetWaitReceiveAvail;5013 pThis->INetwork Port.pfnReceive = pcnetReceive;5012 pThis->INetworkDown.pfnWaitReceiveAvail = pcnetWaitReceiveAvail; 5013 pThis->INetworkDown.pfnReceive = pcnetReceive; 5014 5014 /* INetworkConfig */ 5015 5015 pThis->INetworkConfig.pfnGetMac = pcnetGetMac; … … 5201 5201 #endif 5202 5202 } 5203 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORK CONNECTOR);5204 AssertMsgReturn(pThis->pDrv, ("Failed to obtain the PDMINETWORK CONNECTORinterface!\n"),5203 pThis->pDrv = PDMIBASE_QUERY_INTERFACE(pThis->pDrvBase, PDMINETWORKUP); 5204 AssertMsgReturn(pThis->pDrv, ("Failed to obtain the PDMINETWORKUP interface!\n"), 5205 5205 VERR_PDM_MISSING_INTERFACE_BELOW); 5206 5206 }
Note:
See TracChangeset
for help on using the changeset viewer.