ReactOS 0.4.15-dev-7958-gcd0bb1a
options.h
Go to the documentation of this file.
1/* NFSv4.1 client for Windows
2 * Copyright © 2012 The Regents of the University of Michigan
3 *
4 * Olga Kornievskaia <aglo@umich.edu>
5 * Casey Bodley <cbodley@umich.edu>
6 *
7 * This library is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation; either version 2.1 of the License, or (at
10 * your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful, but
13 * without any warranty; without even the implied warranty of merchantability
14 * or fitness for a particular purpose. See the GNU Lesser General Public
15 * License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA
20 */
21
22#ifndef __NFS41_NP_OPTIONS_H__
23#define __NFS41_NP_OPTIONS_H__
24
25
26#define MOUNT_OPTION_BUFFER_SECRET ('n4')
27
28/* MOUNT_OPTION_BUFFER
29 * The mount options buffer received by NPAddConnection3
30 * via NETRESOURCE.lpComment. To avoid interpreting a normal
31 * comment string as mount options, a NULL and secret number
32 * are expected at the front. */
33typedef struct _MOUNT_OPTION_BUFFER {
34 USHORT Zero; /* = 0 */
35 USHORT Secret; /* = 'n4' */
39
40/* CONNECTION_BUFFER
41 * The connection information as sent to the driver via
42 * IOCTL_NFS41_ADDCONN. The buffer contains the connection name
43 * followed by any extended attributes for mount options. */
44typedef struct _CONNECTION_BUFFER {
45 USHORT NameLength; /* length of connection filename */
46 USHORT EaPadding; /* 0-3 bytes of padding to put EaBuffer
47 * on a ULONG boundary */
48 ULONG EaLength; /* length of EaBuffer */
51
52/* CONNECTION_INFO
53 * Used in NPAddConnection3 to encapsulate the formation of
54 * the connection buffer. */
55typedef struct _CONNECTION_INFO {
60
61#define MAX_CONNECTION_BUFFER_SIZE(EaSize) ( \
62 sizeof(CONNECTION_BUFFER) + MAX_PATH + (EaSize) )
63
64
65/* options.c */
67 IN OUT PCONNECTION_INFO Connection,
69 OUT LPWSTR *ConnectionName);
70
72 IN OUT PCONNECTION_INFO Connection);
73
74/* MarshallConnectionInfo
75 * Prepares the CONNECTION_BUFFER for transmission to the driver
76 * by copying the extended attributes into place and updating the
77 * lengths accordingly. */
79 IN OUT PCONNECTION_INFO Connection);
80
81
82#endif /* !__NFS41_NP_OPTIONS_H__ */
Definition: bufpool.h:45
struct _MOUNT_OPTION_BUFFER * PMOUNT_OPTION_BUFFER
struct _CONNECTION_BUFFER CONNECTION_BUFFER
void MarshalConnectionInfo(IN OUT PCONNECTION_INFO Connection)
Definition: options.c:68
struct _CONNECTION_INFO * PCONNECTION_INFO
struct _CONNECTION_INFO CONNECTION_INFO
DWORD InitializeConnectionInfo(IN OUT PCONNECTION_INFO Connection, IN PMOUNT_OPTION_BUFFER Options, OUT LPWSTR *ConnectionName)
Definition: options.c:26
void FreeConnectionInfo(IN OUT PCONNECTION_INFO Connection)
struct _MOUNT_OPTION_BUFFER MOUNT_OPTION_BUFFER
struct _CONNECTION_BUFFER * PCONNECTION_BUFFER
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short USHORT
Definition: pedump.c:61
USHORT NameLength
Definition: options.h:45
USHORT EaPadding
Definition: options.h:46
ULONG BufferSize
Definition: options.h:57
PCONNECTION_BUFFER Buffer
Definition: options.h:58
PMOUNT_OPTION_BUFFER Options
Definition: options.h:56
#define IN
Definition: typedefs.h:39
uint32_t ULONG
Definition: typedefs.h:59
#define OUT
Definition: typedefs.h:40
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
Definition: wdfdevice.h:3534
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193