aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifspdu.h
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2009-02-25 11:24:04 -0500
committerSteve French <sfrench@us.ibm.com>2009-03-11 21:36:21 -0400
commit0382457744969b0a3aa39ba997944903c5972cbc (patch)
tree7d8acab759aadfc1299eb01fcf3c7038c7a086c1 /fs/cifs/cifspdu.h
parent1adcb71092f6461c4002ccf29d316f6da3e1f39b (diff)
[CIFS] Add definitions for remoteably fsctl calls
There are about 60 fsctl calls which Windows claims would be able to be sent remotely and handled by the server. This adds the #defines for them. A few of them look immediately useful, but need to also add the structure definitions for them so they can be sent as SMBs. Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/cifspdu.h')
-rw-r--r--fs/cifs/cifspdu.h49
1 files changed, 6 insertions, 43 deletions
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h
index 56127638b91e..b370489c8da5 100644
--- a/fs/cifs/cifspdu.h
+++ b/fs/cifs/cifspdu.h
@@ -1,7 +1,7 @@
1/* 1/*
2 * fs/cifs/cifspdu.h 2 * fs/cifs/cifspdu.h
3 * 3 *
4 * Copyright (c) International Business Machines Corp., 2002,2008 4 * Copyright (c) International Business Machines Corp., 2002,2009
5 * Author(s): Steve French (sfrench@us.ibm.com) 5 * Author(s): Steve French (sfrench@us.ibm.com)
6 * 6 *
7 * This library is free software; you can redistribute it and/or modify 7 * This library is free software; you can redistribute it and/or modify
@@ -23,6 +23,7 @@
23#define _CIFSPDU_H 23#define _CIFSPDU_H
24 24
25#include <net/sock.h> 25#include <net/sock.h>
26#include "smbfsctl.h"
26 27
27#ifdef CONFIG_CIFS_WEAK_PW_HASH 28#ifdef CONFIG_CIFS_WEAK_PW_HASH
28#define LANMAN_PROT 0 29#define LANMAN_PROT 0
@@ -34,11 +35,10 @@
34#define POSIX_PROT (CIFS_PROT+1) 35#define POSIX_PROT (CIFS_PROT+1)
35#define BAD_PROT 0xFFFF 36#define BAD_PROT 0xFFFF
36 37
37/* SMB command codes */ 38/* SMB command codes:
38/* 39 * Note some commands have minimal (wct=0,bcc=0), or uninteresting, responses
39 * Some commands have minimal (wct=0,bcc=0), or uninteresting, responses
40 * (ie which include no useful data other than the SMB error code itself). 40 * (ie which include no useful data other than the SMB error code itself).
41 * Knowing this helps avoid response buffer allocations and copy in some cases 41 * This can allow us to avoid response buffer allocations and copy in some cases
42 */ 42 */
43#define SMB_COM_CREATE_DIRECTORY 0x00 /* trivial response */ 43#define SMB_COM_CREATE_DIRECTORY 0x00 /* trivial response */
44#define SMB_COM_DELETE_DIRECTORY 0x01 /* trivial response */ 44#define SMB_COM_DELETE_DIRECTORY 0x01 /* trivial response */
@@ -1963,39 +1963,6 @@ typedef struct smb_com_transaction_get_dfs_refer_rsp {
1963#define DFSREF_STORAGE_SERVER 0x00000002 /* no further ref requests needed */ 1963#define DFSREF_STORAGE_SERVER 0x00000002 /* no further ref requests needed */
1964#define DFSREF_TARGET_FAILBACK 0x00000004 /* only for DFS referral version 4 */ 1964#define DFSREF_TARGET_FAILBACK 0x00000004 /* only for DFS referral version 4 */
1965 1965
1966/* IOCTL information */
1967/*
1968 * List of ioctl function codes that look to be of interest to remote clients
1969 * like this one. Need to do some experimentation to make sure they all work
1970 * remotely. Some of the following, such as the encryption/compression ones
1971 * would be invoked from tools via a specialized hook into the VFS rather
1972 * than via the standard vfs entry points
1973 */
1974#define FSCTL_REQUEST_OPLOCK_LEVEL_1 0x00090000
1975#define FSCTL_REQUEST_OPLOCK_LEVEL_2 0x00090004
1976#define FSCTL_REQUEST_BATCH_OPLOCK 0x00090008
1977#define FSCTL_LOCK_VOLUME 0x00090018
1978#define FSCTL_UNLOCK_VOLUME 0x0009001C
1979#define FSCTL_GET_COMPRESSION 0x0009003C
1980#define FSCTL_SET_COMPRESSION 0x0009C040
1981#define FSCTL_REQUEST_FILTER_OPLOCK 0x0009008C
1982#define FSCTL_FILESYS_GET_STATISTICS 0x00090090
1983#define FSCTL_SET_REPARSE_POINT 0x000900A4
1984#define FSCTL_GET_REPARSE_POINT 0x000900A8
1985#define FSCTL_DELETE_REPARSE_POINT 0x000900AC
1986#define FSCTL_SET_SPARSE 0x000900C4
1987#define FSCTL_SET_ZERO_DATA 0x000900C8
1988#define FSCTL_SET_ENCRYPTION 0x000900D7
1989#define FSCTL_ENCRYPTION_FSCTL_IO 0x000900DB
1990#define FSCTL_WRITE_RAW_ENCRYPTED 0x000900DF
1991#define FSCTL_READ_RAW_ENCRYPTED 0x000900E3
1992#define FSCTL_SIS_COPYFILE 0x00090100
1993#define FSCTL_SIS_LINK_FILES 0x0009C104
1994
1995#define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003
1996#define IO_REPARSE_TAG_HSM 0xC0000004
1997#define IO_REPARSE_TAG_SIS 0x80000007
1998
1999/* 1966/*
2000 ************************************************************************ 1967 ************************************************************************
2001 * All structs for everything above the SMB PDUs themselves 1968 * All structs for everything above the SMB PDUs themselves
@@ -2515,8 +2482,6 @@ struct data_blob {
2515 6) Use nanosecond timestamps throughout all time fields if 2482 6) Use nanosecond timestamps throughout all time fields if
2516 corresponding attribute flag is set 2483 corresponding attribute flag is set
2517 7) sendfile - handle based copy 2484 7) sendfile - handle based copy
2518 8) Direct i/o
2519 9) Misc fcntls?
2520 2485
2521 what about fixing 64 bit alignment 2486 what about fixing 64 bit alignment
2522 2487
@@ -2635,7 +2600,5 @@ typedef struct file_chattr_info {
2635 __le64 mode; /* list of actual attribute bits on this inode */ 2600 __le64 mode; /* list of actual attribute bits on this inode */
2636} __attribute__((packed)) FILE_CHATTR_INFO; /* ext attributes 2601} __attribute__((packed)) FILE_CHATTR_INFO; /* ext attributes
2637 (chattr, chflags) level 0x206 */ 2602 (chattr, chflags) level 0x206 */
2638 2603#endif /* POSIX */
2639#endif
2640
2641#endif /* _CIFSPDU_H */ 2604#endif /* _CIFSPDU_H */