diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/linux/smb.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 'include/linux/smb.h')
-rw-r--r-- | include/linux/smb.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/include/linux/smb.h b/include/linux/smb.h new file mode 100644 index 000000000000..b0162208c963 --- /dev/null +++ b/include/linux/smb.h | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * smb.h | ||
3 | * | ||
4 | * Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke | ||
5 | * Copyright (C) 1997 by Volker Lendecke | ||
6 | * | ||
7 | */ | ||
8 | |||
9 | #ifndef _LINUX_SMB_H | ||
10 | #define _LINUX_SMB_H | ||
11 | |||
12 | #include <linux/types.h> | ||
13 | |||
14 | enum smb_protocol { | ||
15 | SMB_PROTOCOL_NONE, | ||
16 | SMB_PROTOCOL_CORE, | ||
17 | SMB_PROTOCOL_COREPLUS, | ||
18 | SMB_PROTOCOL_LANMAN1, | ||
19 | SMB_PROTOCOL_LANMAN2, | ||
20 | SMB_PROTOCOL_NT1 | ||
21 | }; | ||
22 | |||
23 | enum smb_case_hndl { | ||
24 | SMB_CASE_DEFAULT, | ||
25 | SMB_CASE_LOWER, | ||
26 | SMB_CASE_UPPER | ||
27 | }; | ||
28 | |||
29 | struct smb_dskattr { | ||
30 | __u16 total; | ||
31 | __u16 allocblocks; | ||
32 | __u16 blocksize; | ||
33 | __u16 free; | ||
34 | }; | ||
35 | |||
36 | struct smb_conn_opt { | ||
37 | |||
38 | /* The socket */ | ||
39 | unsigned int fd; | ||
40 | |||
41 | enum smb_protocol protocol; | ||
42 | enum smb_case_hndl case_handling; | ||
43 | |||
44 | /* Connection-Options */ | ||
45 | |||
46 | __u32 max_xmit; | ||
47 | __u16 server_uid; | ||
48 | __u16 tid; | ||
49 | |||
50 | /* The following are LANMAN 1.0 options */ | ||
51 | __u16 secmode; | ||
52 | __u16 maxmux; | ||
53 | __u16 maxvcs; | ||
54 | __u16 rawmode; | ||
55 | __u32 sesskey; | ||
56 | |||
57 | /* The following are NT LM 0.12 options */ | ||
58 | __u32 maxraw; | ||
59 | __u32 capabilities; | ||
60 | __s16 serverzone; | ||
61 | }; | ||
62 | |||
63 | #ifdef __KERNEL__ | ||
64 | |||
65 | #define SMB_NLS_MAXNAMELEN 20 | ||
66 | struct smb_nls_codepage { | ||
67 | char local_name[SMB_NLS_MAXNAMELEN]; | ||
68 | char remote_name[SMB_NLS_MAXNAMELEN]; | ||
69 | }; | ||
70 | |||
71 | |||
72 | #define SMB_MAXNAMELEN 255 | ||
73 | #define SMB_MAXPATHLEN 1024 | ||
74 | |||
75 | /* | ||
76 | * Contains all relevant data on a SMB networked file. | ||
77 | */ | ||
78 | struct smb_fattr { | ||
79 | __u16 attr; | ||
80 | |||
81 | unsigned long f_ino; | ||
82 | umode_t f_mode; | ||
83 | nlink_t f_nlink; | ||
84 | uid_t f_uid; | ||
85 | gid_t f_gid; | ||
86 | dev_t f_rdev; | ||
87 | loff_t f_size; | ||
88 | struct timespec f_atime; | ||
89 | struct timespec f_mtime; | ||
90 | struct timespec f_ctime; | ||
91 | unsigned long f_blksize; | ||
92 | unsigned long f_blocks; | ||
93 | int f_unix; | ||
94 | }; | ||
95 | |||
96 | enum smb_conn_state { | ||
97 | CONN_VALID, /* everything's fine */ | ||
98 | CONN_INVALID, /* Something went wrong, but did not | ||
99 | try to reconnect yet. */ | ||
100 | CONN_RETRIED, /* Tried a reconnection, but was refused */ | ||
101 | CONN_RETRYING /* Currently trying to reconnect */ | ||
102 | }; | ||
103 | |||
104 | #define SMB_SUPER_MAGIC 0x517B | ||
105 | |||
106 | #define SMB_HEADER_LEN 37 /* includes everything up to, but not | ||
107 | * including smb_bcc */ | ||
108 | |||
109 | #define SMB_INITIAL_PACKET_SIZE 4000 | ||
110 | #define SMB_MAX_PACKET_SIZE 32768 | ||
111 | |||
112 | /* reserve this much space for trans2 parameters. Shouldn't have to be more | ||
113 | than 10 or so, but OS/2 seems happier like this. */ | ||
114 | #define SMB_TRANS2_MAX_PARAM 64 | ||
115 | |||
116 | #endif | ||
117 | #endif | ||