[opensm] removed opensm\user\include\ib_types.h, even though it was not used, it...
[mirror/winof/.git] / core / winverbs / kernel / wv_ep.h
1 /*\r
2  * Copyright (c) 2008 Intel Corporation. All rights reserved.\r
3  *\r
4  * This software is available to you under the OpenIB.org BSD license\r
5  * below:\r
6  *\r
7  *     Redistribution and use in source and binary forms, with or\r
8  *     without modification, are permitted provided that the following\r
9  *     conditions are met:\r
10  *\r
11  *      - Redistributions of source code must retain the above\r
12  *        copyright notice, this list of conditions and the following\r
13  *        disclaimer.\r
14  *\r
15  *      - Redistributions in binary form must reproduce the above\r
16  *        copyright notice, this list of conditions and the following\r
17  *        disclaimer in the documentation and/or other materials\r
18  *        provided with the distribution.\r
19  *\r
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,\r
21  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r
22  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AWV\r
23  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\r
24  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\r
25  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
26  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r
27  * SOFTWARE.\r
28  */\r
29 \r
30 #pragma once\r
31 \r
32 #ifndef _WV_EP_H_\r
33 #define _WV_EP_H_\r
34 \r
35 #include <ntddk.h>\r
36 #include <wdm.h>\r
37 \r
38 #include "work_queue.h"\r
39 #include <iba\ib_types.h>\r
40 #include <iba\ib_ci.h>\r
41 #include "wv_provider.h"\r
42 #include "wv_ioctl.h"\r
43 \r
44 typedef enum _WV_ENDPOINT_STATE\r
45 {\r
46         WvEpIdle,\r
47         WvEpAddressBound,\r
48         WvEpListening,\r
49         WvEpQueued,\r
50         WvEpRouteResolved,\r
51         WvEpPassiveConnect,\r
52         WvEpActiveConnect,\r
53         WvEpConnected,\r
54         WvEpActiveDisconnect,\r
55         WvEpPassiveDisconnect,\r
56         WvEpDisconnected,\r
57         WvEpDestroying\r
58 \r
59 }       WV_ENDPOINT_STATE;\r
60 \r
61 typedef struct _WV_ENDPOINT\r
62 {\r
63         WV_PROVIDER                     *pProvider;\r
64         LIST_ENTRY                      Entry;\r
65         WV_ENDPOINT_STATE       State;\r
66 \r
67         iba_cm_id                       *pIbCmId;\r
68         WV_IO_EP_ATTRIBUTES     Attributes;\r
69         ib_path_rec_t           Route;\r
70 \r
71         UINT16                          EpType;\r
72         KEVENT                          Event;\r
73         LONG                            Ref;\r
74         WDFQUEUE                        Queue;\r
75         WV_WORK_ENTRY           *pWork;\r
76 \r
77 }       WV_ENDPOINT;\r
78 \r
79 void WvEpCreate(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
80 void WvEpDestroy(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
81 void WvEpFree(WV_ENDPOINT *pEndpoint);\r
82 void WvEpCancelListen(WV_ENDPOINT *pEndpoint);\r
83 \r
84 void WvEpQuery(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
85 void WvEpModify(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
86 void WvEpBind(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
87 void WvEpCancel(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
88 \r
89 void WvEpConnect(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
90 void WvEpAccept(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
91 void WvEpReject(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
92 void WvEpDisconnect(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
93 void WvEpDisconnectNotify(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
94 \r
95 void WvEpListen(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
96 void WvEpGetRequest(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
97 \r
98 void WvEpLookup(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
99 void WvEpMulticastJoin(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
100 void WvEpMulticastLeave(WV_PROVIDER *pProvider, WDFREQUEST Request);\r
101 \r
102 #endif // _WV_EP_H_\r