aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/rfc1002pdu.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /fs/cifs/rfc1002pdu.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'fs/cifs/rfc1002pdu.h')
-rw-r--r--fs/cifs/rfc1002pdu.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/fs/cifs/rfc1002pdu.h b/fs/cifs/rfc1002pdu.h
new file mode 100644
index 000000000000..806c0ed06da9
--- /dev/null
+++ b/fs/cifs/rfc1002pdu.h
@@ -0,0 +1,79 @@
1/*
2 * fs/cifs/rfc1002pdu.h
3 *
4 * Protocol Data Unit definitions for RFC 1001/1002 support
5 *
6 * Copyright (c) International Business Machines Corp., 2004
7 * Author(s): Steve French (sfrench@us.ibm.com)
8 *
9 * This library is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU Lesser General Public License as published
11 * by the Free Software Foundation; either version 2.1 of the License, or
12 * (at your option) any later version.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
17 * the GNU Lesser General Public License for more details.
18 *
19 * You should have received a copy of the GNU Lesser General Public License
20 * along with this library; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23
24#pragma pack(1)
25
26/* NB: unlike smb/cifs packets, the RFC1002 structures are big endian */
27
28 /* RFC 1002 session packet types */
29#define RFC1002_SESSION_MESASAGE 0x00
30#define RFC1002_SESSION_REQUEST 0x81
31#define RFC1002_POSITIVE_SESSION_RESPONSE 0x82
32#define RFC1002_NEGATIVE_SESSION_RESPONSE 0x83
33#define RFC1002_RETARGET_SESSION_RESPONSE 0x83
34#define RFC1002_SESSION_KEEP_ALIVE 0x85
35
36 /* RFC 1002 flags (only one defined */
37#define RFC1002_LENGTH_EXTEND 0x80 /* high order bit of length (ie +64K) */
38
39struct rfc1002_session_packet {
40 __u8 type;
41 __u8 flags;
42 __u16 length;
43 union {
44 struct {
45 __u8 called_len;
46 __u8 called_name[32];
47 __u8 scope1; /* null */
48 __u8 calling_len;
49 __u8 calling_name[32];
50 __u8 scope2; /* null */
51 } session_req;
52 struct {
53 __u32 retarget_ip_addr;
54 __u16 port;
55 } retarget_resp;
56 __u8 neg_ses_resp_error_code;
57 /* POSITIVE_SESSION_RESPONSE packet does not include trailer.
58 SESSION_KEEP_ALIVE packet also does not include a trailer.
59 Trailer for the SESSION_MESSAGE packet is SMB/CIFS header */
60 } trailer;
61};
62
63/* Negative Session Response error codes */
64#define RFC1002_NOT_LISTENING_CALLED 0x80 /* not listening on called name */
65#define RFC1002_NOT_LISTENING_CALLING 0x81 /* not listening on calling name */
66#define RFC1002_NOT_PRESENT 0x82 /* called name not present */
67#define RFC1002_INSUFFICIENT_RESOURCE 0x83
68#define RFC1002_UNSPECIFIED_ERROR 0x8F
69
70/* RFC 1002 Datagram service packets are not defined here as they
71are not needed for the network filesystem client unless we plan on
72implementing broadcast resolution of the server ip address (from
73server netbios name). Currently server names are resolved only via DNS
74(tcp name) or ip address or an /etc/hosts equivalent mapping to ip address.*/
75
76#define DEFAULT_CIFS_CALLED_NAME "*SMBSERVER "
77
78#pragma pack() /* resume default structure packing */
79