winverbs/nd: map completion status to ND values
[mirror/winof/.git] / inc / user / rdma / winverbs.h
index 9c0732e..12542a5 100644 (file)
@@ -194,6 +194,25 @@ typedef enum _WV_OPCODE
 \r
 }      WV_OPCODE;\r
 \r
+typedef enum _WV_WC_STATUS\r
+{\r
+       WvWcSuccess,\r
+       WvWcLocalLengthError,\r
+       WvWcLocalOpError,\r
+       WvWcLocalProtectionError,\r
+       WvWcFlushed,\r
+       WvWcMwBindError,\r
+       WvWcRemoteAccessError,\r
+       WvWcRemoteOpError,\r
+       WvWcRnrRetryError,\r
+       WvWcTimeoutRetryError,\r
+       WvWcRemoteInvalidRequest,\r
+       WvWcBadResponse,\r
+       WvWcLocalAccessError,\r
+       WvWcError\r
+\r
+}      WV_WC_STATUS;\r
+\r
 // Completion flags\r
 #define WV_WC_IMMEDIATE                0x00000001\r
 // reserved                                    0x00000002\r
@@ -207,7 +226,7 @@ typedef struct _WV_COMPLETION
        WV_OPCODE               Opcode;\r
        UINT32                  Length;\r
        UINT64                  VendorCode;\r
-       HRESULT                 Status;\r
+       WV_WC_STATUS    Status;\r
 \r
        // Receive completion data\r
        DWORD                   Flags;\r
@@ -291,14 +310,14 @@ typedef struct _WV_SEND_REQUEST
        {\r
                struct\r
                {\r
-                       UINT64                  RemoteAddress;\r
+                       NET64                   RemoteAddress;\r
                        NET32                   Rkey;\r
 \r
                }       Rdma;\r
 \r
                struct\r
                {\r
-                       UINT64                  RemoteAddress;\r
+                       NET64                   RemoteAddress;\r
                        NET32                   Rkey;\r
                        NET64                   Compare;\r
                        NET64                   Exchange;\r
@@ -307,7 +326,7 @@ typedef struct _WV_SEND_REQUEST
 \r
                struct\r
                {\r
-                       UINT64                  RemoteAddress;\r
+                       NET64                   RemoteAddress;\r
                        NET32                   Rkey;\r
                        NET64                   Add;\r
                        UINT64                  Reserved;\r
@@ -739,9 +758,9 @@ DECLARE_INTERFACE_(IWVSharedReceiveQueue, IWVOverlapped)
 \r
 #undef INTERFACE\r
 #define INTERFACE IWVQueuePair\r
-// {a847c13c-e617-489c-b0ab-2da73eb0adfd}\r
-DEFINE_GUID(IID_IWVQueuePair, 0xa847c13c, 0xe617, 0x489c,\r
-                       0xb0, 0xab, 0x2d, 0xa7, 0x3e, 0xb0, 0xad, 0xfd);\r
+// {35C64226-6A1F-4c8d-9465-C6FEE8053CDD}\r
+DEFINE_GUID(IID_IWVQueuePair, 0x35c64226, 0x6a1f, 0x4c8d,\r
+                       0x94, 0x65, 0xc6, 0xfe, 0xe8, 0x5, 0x3c, 0xdd);\r
 \r
 DECLARE_INTERFACE_(IWVQueuePair, IWVOverlapped)\r
 {\r
@@ -802,9 +821,9 @@ DECLARE_INTERFACE_(IWVQueuePair, IWVOverlapped)
 \r
 #undef INTERFACE\r
 #define INTERFACE IWVConnectQueuePair\r
-// {A791309C-4244-4194-AD63-7D372CADE5E0}\r
-DEFINE_GUID(IID_IWVConnectQueuePair, 0xa791309c, 0x4244, 0x4194,\r
-                       0xad, 0x63, 0x7d, 0x37, 0x2c, 0xad, 0xe5, 0xe0);\r
+// {DF905570-AEEB-4114-B30E-4DC3EB5A9AD6}\r
+DEFINE_GUID(IID_IWVConnectQueuePair, 0xdf905570, 0xaeeb, 0x4114,\r
+                       0xb3, 0xe, 0x4d, 0xc3, 0xeb, 0x5a, 0x9a, 0xd6);\r
 \r
 DECLARE_INTERFACE_(IWVConnectQueuePair, IWVQueuePair)\r
 {\r
@@ -1022,11 +1041,11 @@ DECLARE_INTERFACE_(IWVDatagramQueuePair, IWVQueuePair)
 \r
 #undef INTERFACE\r
 #define INTERFACE IWVProtectionDomain\r
-// {a5633a12-dffc-4060-927d-9a600d7efb63}\r
-DEFINE_GUID(IID_IWVProtectionDomain, 0xa5633a12, 0xdffc, 0x4060,\r
-                       0x92, 0x7d, 0x9a, 0x60, 0x0d, 0x7e, 0xfb, 0x63);\r
+// {E3657ABE-8C4E-4994-BE32-45B49BAE95E4}\r
+DEFINE_GUID(IID_IWVProtectionDomain, 0xe3657abe, 0x8c4e, 0x4994,\r
+                       0xbe, 0x32, 0x45, 0xb4, 0x9b, 0xae, 0x95, 0xe4);\r
 \r
-DECLARE_INTERFACE_(IWVProtectionDomain, IUnknown)\r
+DECLARE_INTERFACE_(IWVProtectionDomain, IWVOverlapped)\r
 {\r
        // IUnknown methods\r
        __override STDMETHOD(QueryInterface)(\r
@@ -1043,6 +1062,18 @@ DECLARE_INTERFACE_(IWVProtectionDomain, IUnknown)
                THIS\r
                ) PURE;\r
 \r
+       // IWVOverlapped methods\r
+       STDMETHOD(CancelOverlappedRequests)(\r
+               THIS\r
+               ) PURE;\r
+\r
+       STDMETHOD(GetOverlappedResult)(\r
+               THIS_\r
+               __inout_opt OVERLAPPED *pOverlapped,\r
+               __out DWORD *pNumberOfBytesTransferred,\r
+               __in BOOL bWait\r
+               ) PURE;\r
+\r
        // IWVProtectionDomain methods\r
        STDMETHOD(CreateSharedReceiveQueue)(\r
                THIS_\r
@@ -1156,9 +1187,9 @@ DECLARE_INTERFACE_(IWVEndpoint, IWVOverlapped)
 \r
 #undef INTERFACE\r
 #define INTERFACE IWVConnectEndpoint\r
-// {ac670274-1934-4759-a39c-eee01a8130b3}\r
-DEFINE_GUID(IID_IWVConnectEndpoint, 0xac670274, 0x1934, 0x4759,\r
-                       0xa3, 0x9c, 0xee, 0xe0, 0x1a, 0x81, 0x30, 0xb3);\r
+// {8FDA0EE7-E7F7-48cc-83D3-17E9C871FEA3}\r
+DEFINE_GUID(IID_IWVConnectEndpoint, 0x8fda0ee7, 0xe7f7, 0x48cc,\r
+                       0x83, 0xd3, 0x17, 0xe9, 0xc8, 0x71, 0xfe, 0xa3);\r
 \r
 DECLARE_INTERFACE_(IWVConnectEndpoint, IWVEndpoint)\r
 {\r
@@ -1230,13 +1261,14 @@ DECLARE_INTERFACE_(IWVConnectEndpoint, IWVEndpoint)
 \r
        STDMETHOD(Accept)(\r
                THIS_\r
-               __in IWVConnectQueuePair* pQp,\r
+               __in_opt IWVConnectQueuePair* pQp,\r
                __in WV_CONNECT_PARAM* pParam,\r
                __in_opt OVERLAPPED* pOverlapped\r
                ) PURE;\r
 \r
        STDMETHOD(Disconnect)(\r
-               THIS\r
+               THIS_\r
+               __in_opt OVERLAPPED* pOverlapped\r
                ) PURE;\r
 \r
        STDMETHOD(NotifyDisconnect)(\r
@@ -1447,9 +1479,9 @@ DECLARE_INTERFACE_(IWVDevice, IWVOverlapped)
 \r
 #undef INTERFACE\r
 #define INTERFACE IWVProvider\r
-// {060E95D6-EC54-43b2-83FC-B578FD037259}\r
-DEFINE_GUID(IID_IWVProvider, 0x60e95d6, 0xec54, 0x43b2,\r
-                       0x83, 0xfc, 0xb5, 0x78, 0xfd, 0x3, 0x72, 0x59);\r
+// {75AD0EDA-23C9-4687-8FFF-D1B34E1EF5BE}\r
+DEFINE_GUID(IID_IWVProvider, 0x75ad0eda, 0x23c9, 0x4687,\r
+                       0x8f, 0xff, 0xd1, 0xb3, 0x4e, 0x1e, 0xf5, 0xbe);\r
 \r
 DECLARE_INTERFACE_(IWVProvider, IUnknown)\r
 {\r
@@ -1508,6 +1540,10 @@ DECLARE_INTERFACE_(IWVProvider, IUnknown)
                ) PURE;\r
 };\r
 \r
+#ifdef __cplusplus\r
+extern "C" __declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);\r
+#else\r
 __declspec(dllexport) HRESULT WvGetObject(REFIID riid, LPVOID FAR* ppvObj);\r
+#endif\r
 \r
 #endif // _WINVERBS_H_\r