Coda Distributed File System
nt_util.h
Go to the documentation of this file.
1/* BLURB gpl
2
3 Coda File System
4 Release 6
5
6 Copyright (c) 1987-2003 Carnegie Mellon University
7 Additional copyrights listed below
8
9This code is distributed "AS IS" without warranty of any kind under
10the terms of the GNU General Public Licence Version 2, as shown in the
11file LICENSE. The technical and financial contributors to Coda are
12listed in the file CREDITS.
13
14 Additional copyrights
15 none currently
16
17#*/
18
19#ifdef __CYGWIN32__
20#include <windows.h>
21#include <winbase.h>
22#include <winioctl.h>
23
24// Defines needed for DeviceIoControls from OSR headers
25
26#define OW_FSCTL_MOUNT_PSEUDO \
27 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3031, METHOD_BUFFERED, FILE_WRITE_ACCESS)
28#define OW_FSCTL_DISMOUNT_PSEUDO \
29 CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 3033, METHOD_NEITHER, FILE_WRITE_ACCESS)
30
31//
32// Pseudo mount/dismount data structures
33//
34
35typedef struct {
36 HANDLE PseudoVolumeHandle;
37 USHORT PseudoDeviceNameLength;
38 PWCHAR PseudoDeviceName;
39 USHORT PseudoLinkNameLength;
40 PWCHAR PseudoLinkName;
41} OW_PSEUDO_MOUNT_INFO, *POW_PSEUDO_MOUNT_INFO;
42
43// XXX broken ... should use CTL_CODE like above.. should match
44// ntfsd/coda/coda_nt.h
45//
46#define CODA_FSCTL_ANSWER 0x1002
47#define CODA_FSCTL_FETCH 0x1003
48#define CODA_FSCTL_PIOCTL 0x1006
49
50// prototypes
51
52void nt_mount(const char *drivename);
53void nt_umount(const char *drivename);
54
55int nt_initialize_ipc(int sock);
56int nt_msg_write(const char *buf, int size);
57void nt_stop_ipc(void);
58
59#endif