VirtualBox

Changeset 97338 in vbox for trunk/include


Ignore:
Timestamp:
Oct 31, 2022 8:15:38 AM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
154336
Message:

NetworkServices/IntNetSwitch,Devices/Network/DrvIntNet,Devices/Network/SrvIntNetR0: Don't require a dedicated waiting thread to get notified when there is something to receive but make it possible to register a callback which is called and sends an IPC message instead, bugref:10297

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/intnet.h

    r97046 r97338  
    5151/** The userspace internal network service identifier. */
    5252#if defined(RT_OS_DARWIN) && defined(VBOX_WITH_INTNET_SERVICE_IN_R3)
    53 # define INTNET_R3_SVC_NAME "org.virtualbox.intnet"
     53/** The XPC service identififer. */
     54# define INTNET_R3_SVC_NAME                 "org.virtualbox.intnet"
     55/** The high 32 bits pattern for the "rc" status code field to recognize errors
     56 * where xpc_dictionary_get_int64() might return 0 which could be confused with VINF_SUCCESS. */
     57# define INTNET_R3_SVC_RC_PATTERN           ((uint64_t)RT_MAKE_U32_FROM_U8('V', 'B', 'O', 'X'))
     58/** Constructs a signd 64bit value for the given 32-bit status code. */
     59# define INTNET_R3_SVC_SET_RC(a_rc)         ((INTNET_R3_SVC_RC_PATTERN << 32) | (uint64_t)(a_rc))
     60/** Gets the status code from the given 64-bit signed status code value. */
     61# define INTNET_R3_SVC_GET_RC(a_RcVal)      ((int32_t)(a_RcVal))
     62/** Checks whether the given 64-bit signed status code value encodes a valid IPRT/VBOX status code. */
     63# define INTNET_R3_SVC_IS_VALID_RC(a_RcVal) (((a_RcVal) >> 32) == INTNET_R3_SVC_RC_PATTERN)
    5464#endif
    5565
     
    13171327#endif /* IN_RING0 */
    13181328
     1329/**
     1330 * Callback function for use with IntNetR3Open to signalling incoming data.
     1331 * 
     1332 * @param   hIf     Interface handle.
     1333 * @param   pvUser  User parameter.
     1334 */
     1335typedef DECLCALLBACKTYPE(void, FNINTNETIFRECVAVAIL,(INTNETIFHANDLE hIf, void *pvUser));
     1336/** Pointer to a FNINTNETIFRECVAVAIL callback. */
     1337typedef FNINTNETIFRECVAVAIL *PFNINTNETIFRECVAVAIL;
     1338
     1339#if defined(VBOX_WITH_INTNET_SERVICE_IN_R3) && defined(IN_RING3)
     1340INTNETR3DECL(int)       IntNetR3Open(PSUPDRVSESSION pSession, const char *pszNetwork,
     1341                                     INTNETTRUNKTYPE enmTrunkType, const char *pszTrunk, uint32_t fFlags,
     1342                                     uint32_t cbSend, uint32_t cbRecv, PFNINTNETIFRECVAVAIL pfnRecvAvail,
     1343                                     void *pvUserRecvAvail, PINTNETIFHANDLE phIf);
     1344#endif
     1345
    13191346RT_C_DECLS_END
    13201347
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette