Windows: Direct IO Support for Service
[openafs.git] / src / WINNT / afsrdr / common / AFSProvider.h
1 /*
2  * Copyright (c) 2008-2011 Kernel Drivers, LLC.
3  * Copyright (c) 2009-2011 Your File System, Inc.
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms, with or without
7  * modification, are permitted provided that the following conditions
8  * are met:
9  *
10  * - Redistributions of source code must retain the above copyright notice,
11  *   this list of conditions and the following disclaimer.
12  * - Redistributions in binary form must reproduce the above copyright
13  *   notice,
14  *   this list of conditions and the following disclaimer in the
15  *   documentation
16  *   and/or other materials provided with the distribution.
17  * - Neither the name of Kernel Drivers, LLC nor the names of its
18  *   contributors may be
19  *   used to endorse or promote products derived from this software without
20  *   specific prior written permission from Kernel Drivers, LLC
21  *   and Your File System, Inc.
22  *
23  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26  * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
27  * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30  * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32  * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34  */
35
36 #ifndef _AFS_PROVIDER_H
37 #define _AFS_PROVIDER_H
38
39
40 //
41 // Network provider interface header
42 //
43
44
45 //
46 // Redirector device name
47 //
48
49 #define AFS_RDR_DEVICE_NAME         L"\\Device\\AFSRedirector"
50
51 //
52 // Provider specific IOCtl requests
53 //
54
55 #define IOCTL_AFS_ADD_CONNECTION      CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x2001, METHOD_BUFFERED, FILE_ANY_ACCESS)
56 #define IOCTL_AFS_CANCEL_CONNECTION   CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x2002, METHOD_BUFFERED, FILE_ANY_ACCESS)
57 #define IOCTL_AFS_GET_CONNECTION      CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x2003, METHOD_BUFFERED, FILE_ANY_ACCESS)
58 #define IOCTL_AFS_LIST_CONNECTIONS    CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x2004, METHOD_BUFFERED, FILE_ANY_ACCESS)
59 #define IOCTL_AFS_GET_CONNECTION_INFORMATION CTL_CODE( FILE_DEVICE_DISK_FILE_SYSTEM, 0x2005, METHOD_BUFFERED, FILE_ANY_ACCESS)
60
61 //
62 // Versions for the following structures
63 //
64
65 #define AFS_NETWORKPROVIDER_INTERFACE_VERSION_1         0x00000001
66
67 #pragma pack(push, 1)
68 typedef struct _AFS_NETWORKPROVIDER_CONNECTION_CB
69 {
70
71     ULONG       Version;
72
73     ULONG       CurrentIndex;
74
75     ULONG       Type;
76
77     ULONG       Scope;
78
79     ULONG       DisplayType;
80
81     ULONG       Usage;
82
83     ULONG       CommentOffset;  // From the beginning of this structure
84
85     ULONG       CommentLength;
86
87     ULONG       RemainingPathOffset;    // From the beginning of this structure
88
89     ULONG       RemainingPathLength;
90
91     ULONG       RemoteNameLength;
92
93     LARGE_INTEGER AuthenticationId;
94
95     WCHAR       LocalName;
96
97     WCHAR       RemoteName[ 1];
98
99 } AFSNetworkProviderConnectionCB;
100
101 typedef struct _AFS_CANCEL_CONNECTION_RESULT_CB
102 {
103
104     ULONG       Version;
105
106     ULONG       Status;
107
108     WCHAR       LocalName;
109
110 } AFSCancelConnectionResultCB;
111 #pragma pack(pop)
112
113 #endif