Changeset 28706 in vbox for trunk/include/VBox
- Timestamp:
- Apr 25, 2010 3:10:30 PM (15 years ago)
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/intnet.h
r28666 r28706 39 39 RT_C_DECLS_BEGIN 40 40 41 42 /** Pointer to an internal network ring-0 instance. */43 typedef struct INTNET *PINTNET;44 41 45 42 /** … … 749 746 * The trunk connection type. 750 747 * 751 * Used by I NTNETR0Open and assoicated interfaces.748 * Used by IntNetR0Open and assoicated interfaces. 752 749 */ 753 750 typedef enum INTNETTRUNKTYPE … … 773 770 } INTNETTRUNKTYPE; 774 771 775 /** @name I NTNETR0Open flags.772 /** @name IntNetR0Open flags. 776 773 * @{ */ 777 774 /** Share the MAC address with the host when sending something to the wire via the trunk. … … 808 805 809 806 /** 810 * Request buffer for I NTNETR0OpenReq / VMMR0_DO_INTNET_OPEN.811 * @see I NTNETR0Open.807 * Request buffer for IntNetR0OpenReq / VMMR0_DO_INTNET_OPEN. 808 * @see IntNetR0Open. 812 809 */ 813 810 typedef struct INTNETOPENREQ … … 834 831 INTNETIFHANDLE hIf; 835 832 } INTNETOPENREQ; 836 /** Pointer to an I NTNETR0OpenReq / VMMR0_DO_INTNET_OPEN request buffer. */833 /** Pointer to an IntNetR0OpenReq / VMMR0_DO_INTNET_OPEN request buffer. */ 837 834 typedef INTNETOPENREQ *PINTNETOPENREQ; 838 835 839 INTNETR0DECL(int) I NTNETR0OpenReq(PINTNET pIntNet,PSUPDRVSESSION pSession, PINTNETOPENREQ pReq);840 841 842 /** 843 * Request buffer for I NTNETR0IfCloseReq / VMMR0_DO_INTNET_IF_CLOSE.844 * @see I NTNETR0IfClose.836 INTNETR0DECL(int) IntNetR0OpenReq(PSUPDRVSESSION pSession, PINTNETOPENREQ pReq); 837 838 839 /** 840 * Request buffer for IntNetR0IfCloseReq / VMMR0_DO_INTNET_IF_CLOSE. 841 * @see IntNetR0IfClose. 845 842 */ 846 843 typedef struct INTNETIFCLOSEREQ … … 854 851 INTNETIFHANDLE hIf; 855 852 } INTNETIFCLOSEREQ; 856 /** Pointer to an INTNETR0IfCloseReq / VMMR0_DO_INTNET_IF_CLOSE request buffer. */ 853 /** Pointer to an IntNetR0IfCloseReq / VMMR0_DO_INTNET_IF_CLOSE request 854 * buffer. */ 857 855 typedef INTNETIFCLOSEREQ *PINTNETIFCLOSEREQ; 858 856 859 INTNETR0DECL(int) INTNETR0IfCloseReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFCLOSEREQ pReq); 860 861 862 /** 863 * Request buffer for INTNETR0IfGetRing3BufferReq / VMMR0_DO_INTNET_IF_GET_RING3_BUFFER. 864 * @see INTNETR0IfGetRing3Buffer. 857 INTNETR0DECL(int) IntNetR0IfCloseReq(PSUPDRVSESSION pSession, PINTNETIFCLOSEREQ pReq); 858 859 860 /** 861 * Request buffer for IntNetR0IfGetRing3BufferReq / 862 * VMMR0_DO_INTNET_IF_GET_RING3_BUFFER. 863 * @see IntNetR0IfGetRing3Buffer. 865 864 */ 866 865 typedef struct INTNETIFGETRING3BUFFERREQ … … 876 875 R3PTRTYPE(PINTNETBUF) pRing3Buf; 877 876 } INTNETIFGETRING3BUFFERREQ; 878 /** Pointer to an INTNETR0IfGetRing3BufferReq / VMMR0_DO_INTNET_IF_GET_RING3_BUFFER request buffer. */ 877 /** Pointer to an IntNetR0IfGetRing3BufferReq / 878 * VMMR0_DO_INTNET_IF_GET_RING3_BUFFER request buffer. */ 879 879 typedef INTNETIFGETRING3BUFFERREQ *PINTNETIFGETRING3BUFFERREQ; 880 880 881 INTNETR0DECL(int) INTNETR0IfGetRing3BufferReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFGETRING3BUFFERREQ pReq); 882 883 884 /** 885 * Request buffer for INTNETR0IfSetPromiscuousModeReq / VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE. 886 * @see INTNETR0IfSetPromiscuousMode. 881 INTNETR0DECL(int) IntNetR0IfGetRing3BufferReq(PSUPDRVSESSION pSession, PINTNETIFGETRING3BUFFERREQ pReq); 882 883 884 /** 885 * Request buffer for IntNetR0IfSetPromiscuousModeReq / 886 * VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE. 887 * @see IntNetR0IfSetPromiscuousMode. 887 888 */ 888 889 typedef struct INTNETIFSETPROMISCUOUSMODEREQ … … 898 899 bool fPromiscuous; 899 900 } INTNETIFSETPROMISCUOUSMODEREQ; 900 /** Pointer to an INTNETR0IfSetPromiscuousModeReq / VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE request buffer. */ 901 /** Pointer to an IntNetR0IfSetPromiscuousModeReq / 902 * VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE request buffer. */ 901 903 typedef INTNETIFSETPROMISCUOUSMODEREQ *PINTNETIFSETPROMISCUOUSMODEREQ; 902 904 903 INTNETR0DECL(int) INTNETR0IfSetPromiscuousModeReq(PINTNET pIntNet, PSUPDRVSESSION pSession, PINTNETIFSETPROMISCUOUSMODEREQ pReq); 904 905 906 /** 907 * Request buffer for INTNETR0IfSetMacAddressReq / VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS. 908 * @see INTNETR0IfSetMacAddress. 905 INTNETR0DECL(int) IntNetR0IfSetPromiscuousModeReq(PSUPDRVSESSION pSession, PINTNETIFSETPROMISCUOUSMODEREQ pReq); 906 907 908 /** 909 * Request buffer for IntNetR0IfSetMacAddressReq / 910 * VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS. 911 * @see IntNetR0IfSetMacAddress. 909 912 */ 910 913 typedef struct INTNETIFSETMACADDRESSREQ … … 920 923 RTMAC Mac; 921 924 } INTNETIFSETMACADDRESSREQ; 922 /** Pointer to an INTNETR0IfSetMacAddressReq / VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS request buffer. */ 925 /** Pointer to an IntNetR0IfSetMacAddressReq / 926 * VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS request buffer. */ 923 927 typedef INTNETIFSETMACADDRESSREQ *PINTNETIFSETMACADDRESSREQ; 924 928 925 INTNETR0DECL(int) I NTNETR0IfSetMacAddressReq(PINTNET pIntNet,PSUPDRVSESSION pSession, PINTNETIFSETMACADDRESSREQ pReq);926 927 928 /** 929 * Request buffer for I NTNETR0IfSetActiveReq / VMMR0_DO_INTNET_IF_SET_ACTIVE.930 * @see I NTNETR0IfSetActive.929 INTNETR0DECL(int) IntNetR0IfSetMacAddressReq(PSUPDRVSESSION pSession, PINTNETIFSETMACADDRESSREQ pReq); 930 931 932 /** 933 * Request buffer for IntNetR0IfSetActiveReq / VMMR0_DO_INTNET_IF_SET_ACTIVE. 934 * @see IntNetR0IfSetActive. 931 935 */ 932 936 typedef struct INTNETIFSETACTIVEREQ … … 942 946 bool fActive; 943 947 } INTNETIFSETACTIVEREQ; 944 /** Pointer to an INTNETR0IfSetActiveReq / VMMR0_DO_INTNET_IF_SET_ACTIVE request buffer. */ 948 /** Pointer to an IntNetR0IfSetActiveReq / VMMR0_DO_INTNET_IF_SET_ACTIVE 949 * request buffer. */ 945 950 typedef INTNETIFSETACTIVEREQ *PINTNETIFSETACTIVEREQ; 946 951 947 INTNETR0DECL(int) I NTNETR0IfSetActiveReq(PINTNET pIntNet,PSUPDRVSESSION pSession, PINTNETIFSETACTIVEREQ pReq);948 949 950 /** 951 * Request buffer for I NTNETR0IfSendReq / VMMR0_DO_INTNET_IF_SEND.952 * @see I NTNETR0IfSend.952 INTNETR0DECL(int) IntNetR0IfSetActiveReq(PSUPDRVSESSION pSession, PINTNETIFSETACTIVEREQ pReq); 953 954 955 /** 956 * Request buffer for IntNetR0IfSendReq / VMMR0_DO_INTNET_IF_SEND. 957 * @see IntNetR0IfSend. 953 958 */ 954 959 typedef struct INTNETIFSENDREQ … … 962 967 INTNETIFHANDLE hIf; 963 968 } INTNETIFSENDREQ; 964 /** Pointer to an I NTNETR0IfSend() argument package. */969 /** Pointer to an IntNetR0IfSend() argument package. */ 965 970 typedef INTNETIFSENDREQ *PINTNETIFSENDREQ; 966 971 967 INTNETR0DECL(int) I NTNETR0IfSendReq(PINTNET pIntNet,PSUPDRVSESSION pSession, PINTNETIFSENDREQ pReq);968 969 970 /** 971 * Request buffer for I NTNETR0IfWaitReq / VMMR0_DO_INTNET_IF_WAIT.972 * @see I NTNETR0IfWait.972 INTNETR0DECL(int) IntNetR0IfSendReq(PSUPDRVSESSION pSession, PINTNETIFSENDREQ pReq); 973 974 975 /** 976 * Request buffer for IntNetR0IfWaitReq / VMMR0_DO_INTNET_IF_WAIT. 977 * @see IntNetR0IfWait. 973 978 */ 974 979 typedef struct INTNETIFWAITREQ … … 984 989 uint32_t cMillies; 985 990 } INTNETIFWAITREQ; 986 /** Pointer to an I NTNETR0IfWaitReq / VMMR0_DO_INTNET_IF_WAIT request buffer. */991 /** Pointer to an IntNetR0IfWaitReq / VMMR0_DO_INTNET_IF_WAIT request buffer. */ 987 992 typedef INTNETIFWAITREQ *PINTNETIFWAITREQ; 988 993 989 INTNETR0DECL(int) I NTNETR0IfWaitReq(PINTNET pIntNet,PSUPDRVSESSION pSession, PINTNETIFWAITREQ pReq);994 INTNETR0DECL(int) IntNetR0IfWaitReq(PSUPDRVSESSION pSession, PINTNETIFWAITREQ pReq); 990 995 991 996 … … 995 1000 */ 996 1001 997 /** 998 * Create an instance of the Ring-0 internal networking service. 999 * 1000 * @returns VBox status code. 1001 * @param ppIntNet Where to store the instance pointer. 1002 */ 1003 INTNETR0DECL(int) INTNETR0Create(PINTNET *ppIntNet); 1004 1005 /** 1006 * Destroys an instance of the Ring-0 internal networking service. 1007 * 1008 * @param pIntNet Pointer to the instance data. 1009 */ 1010 INTNETR0DECL(void) INTNETR0Destroy(PINTNET pIntNet); 1011 1012 /** 1013 * Opens a network interface and connects it to the specified network. 1014 * 1015 * @returns VBox status code. 1016 * @param pIntNet The internal network instance. 1017 * @param pSession The session handle. 1018 * @param pszNetwork The network name. 1019 * @param enmTrunkType The trunk type. 1020 * @param pszTrunk The trunk name. Its meaning is specfic to the type. 1021 * @param fFlags Flags, see INTNET_OPEN_FLAGS_*. 1022 * @param fRestrictAccess Whether new participants should be subjected to access check or not. 1023 * @param cbSend The send buffer size. 1024 * @param cbRecv The receive buffer size. 1025 * @param phIf Where to store the handle to the network interface. 1026 */ 1027 INTNETR0DECL(int) INTNETR0Open(PINTNET pIntNet, PSUPDRVSESSION pSession, const char *pszNetwork, 1028 INTNETTRUNKTYPE enmTrunkType, const char *pszTrunk, uint32_t fFlags, 1029 unsigned cbSend, unsigned cbRecv, PINTNETIFHANDLE phIf); 1030 1031 /** 1032 * Close an interface. 1033 * 1034 * @returns VBox status code. 1035 * @param pIntNet The instance handle. 1036 * @param hIf The interface handle. 1037 * @param pSession The caller's session. 1038 */ 1039 INTNETR0DECL(int) INTNETR0IfClose(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); 1040 1041 /** 1042 * Gets the ring-0 address of the current buffer. 1043 * 1044 * @returns VBox status code. 1045 * @param pIntNet The instance data. 1046 * @param hIf The interface handle. 1047 * @param pSession The caller's session. 1048 * @param ppRing0Buf Where to store the address of the ring-3 mapping. 1049 */ 1050 INTNETR0DECL(int) INTNETR0IfGetRing0Buffer(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PINTNETBUF *ppRing0Buf); 1051 1052 /** 1053 * Maps the default buffer into ring 3. 1054 * 1055 * @returns VBox status code. 1056 * @param pIntNet The instance data. 1057 * @param hIf The interface handle. 1058 * @param pSession The caller's session. 1059 * @param ppRing3Buf Where to store the address of the ring-3 mapping. 1060 */ 1061 INTNETR0DECL(int) INTNETR0IfGetRing3Buffer(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, R3PTRTYPE(PINTNETBUF) *ppRing3Buf); 1062 1063 /** 1064 * Sets the promiscuous mode property of an interface. 1065 * 1066 * @returns VBox status code. 1067 * @param pIntNet The instance handle. 1068 * @param hIf The interface handle. 1069 * @param pSession The caller's session. 1070 * @param fPromiscuous Set if the interface should be in promiscuous mode, clear if not. 1071 */ 1072 INTNETR0DECL(int) INTNETR0IfSetPromiscuousMode( PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fPromiscuous); 1073 INTNETR0DECL(int) INTNETR0IfSetMacAddress( PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PCRTMAC pMac); 1074 INTNETR0DECL(int) INTNETR0IfSetActive( PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive); 1075 1076 /** 1077 * Sends one or more frames. 1078 * 1079 * The function will first the frame which is passed as the optional 1080 * arguments pvFrame and cbFrame. These are optional since it also 1081 * possible to chain together one or more frames in the send buffer 1082 * which the function will process after considering it's arguments. 1083 * 1084 * @returns VBox status code. 1085 * @param pIntNet The instance data. 1086 * @param hIf The interface handle. 1087 * @param pSession The caller's session. 1088 */ 1089 INTNETR0DECL(int) INTNETR0IfSend(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); 1090 1091 /** 1092 * Wait for the interface to get signaled. 1093 * The interface will be signaled when is put into the receive buffer. 1094 * 1095 * @returns VBox status code. 1096 * @param pIntNet The instance handle. 1097 * @param hIf The interface handle. 1098 * @param pSession The caller's session. 1099 * @param cMillies Number of milliseconds to wait. RT_INDEFINITE_WAIT should be 1100 * used if indefinite wait is desired. 1101 */ 1102 INTNETR0DECL(int) INTNETR0IfWait(PINTNET pIntNet, INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies); 1002 INTNETR0DECL(int) IntNetR0Init(void); 1003 INTNETR0DECL(void) IntNetR0Term(void); 1004 INTNETR0DECL(int) IntNetR0Open(PSUPDRVSESSION pSession, const char *pszNetwork, 1005 INTNETTRUNKTYPE enmTrunkType, const char *pszTrunk, uint32_t fFlags, 1006 uint32_t cbSend, uint32_t cbRecv, PINTNETIFHANDLE phIf); 1007 INTNETR0DECL(uint32_t) IntNetR0GetNetworkCount(void); 1008 1009 INTNETR0DECL(int) IntNetR0IfClose( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); 1010 INTNETR0DECL(int) IntNetR0IfGetRing0Buffer( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PINTNETBUF *ppRing0Buf); 1011 INTNETR0DECL(int) IntNetR0IfGetRing3Buffer( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, R3PTRTYPE(PINTNETBUF) *ppRing3Buf); 1012 INTNETR0DECL(int) IntNetR0IfSetPromiscuousMode(INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fPromiscuous); 1013 INTNETR0DECL(int) IntNetR0IfSetMacAddress( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, PCRTMAC pMac); 1014 INTNETR0DECL(int) IntNetR0IfSetActive( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, bool fActive); 1015 INTNETR0DECL(int) IntNetR0IfSend( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession); 1016 INTNETR0DECL(int) IntNetR0IfWait( INTNETIFHANDLE hIf, PSUPDRVSESSION pSession, uint32_t cMillies); 1103 1017 1104 1018 /** @} */ -
trunk/include/VBox/vmm.h
r28425 r28706 325 325 /** The start of the R0 service operations. */ 326 326 VMMR0_DO_SRV_START, 327 /** Call I NTNETR0Open(). */327 /** Call IntNetR0Open(). */ 328 328 VMMR0_DO_INTNET_OPEN, 329 /** Call I NTNETR0IfClose(). */329 /** Call IntNetR0IfClose(). */ 330 330 VMMR0_DO_INTNET_IF_CLOSE, 331 /** Call I NTNETR0IfGetRing3Buffer(). */331 /** Call IntNetR0IfGetRing3Buffer(). */ 332 332 VMMR0_DO_INTNET_IF_GET_RING3_BUFFER, 333 /** Call I NTNETR0IfSetPromiscuousMode(). */333 /** Call IntNetR0IfSetPromiscuousMode(). */ 334 334 VMMR0_DO_INTNET_IF_SET_PROMISCUOUS_MODE, 335 /** Call I NTNETR0IfSetMacAddress(). */335 /** Call IntNetR0IfSetMacAddress(). */ 336 336 VMMR0_DO_INTNET_IF_SET_MAC_ADDRESS, 337 /** Call I NTNETR0IfSetActive(). */337 /** Call IntNetR0IfSetActive(). */ 338 338 VMMR0_DO_INTNET_IF_SET_ACTIVE, 339 /** Call I NTNETR0IfSend(). */339 /** Call IntNetR0IfSend(). */ 340 340 VMMR0_DO_INTNET_IF_SEND, 341 /** Call I NTNETR0IfWait(). */341 /** Call IntNetR0IfWait(). */ 342 342 VMMR0_DO_INTNET_IF_WAIT, 343 343 /** The end of the R0 service operations. */
Note:
See TracChangeset
for help on using the changeset viewer.