GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / include / linux / smb.h
blob82fefddc5987d0fba7925c76a14f2ac52dd82caf
1 /*
2 * smb.h
4 * Copyright (C) 1995, 1996 by Paal-Kr. Engstad and Volker Lendecke
5 * Copyright (C) 1997 by Volker Lendecke
7 */
9 #ifndef _LINUX_SMB_H
10 #define _LINUX_SMB_H
12 #include <linux/types.h>
13 #include <linux/magic.h>
14 #ifdef __KERNEL__
15 #include <linux/time.h>
16 #endif
18 enum smb_protocol {
19 SMB_PROTOCOL_NONE,
20 SMB_PROTOCOL_CORE,
21 SMB_PROTOCOL_COREPLUS,
22 SMB_PROTOCOL_LANMAN1,
23 SMB_PROTOCOL_LANMAN2,
24 SMB_PROTOCOL_NT1
27 enum smb_case_hndl {
28 SMB_CASE_DEFAULT,
29 SMB_CASE_LOWER,
30 SMB_CASE_UPPER
33 struct smb_dskattr {
34 __u16 total;
35 __u16 allocblocks;
36 __u16 blocksize;
37 __u16 free;
40 struct smb_conn_opt {
42 /* The socket */
43 unsigned int fd;
45 enum smb_protocol protocol;
46 enum smb_case_hndl case_handling;
48 /* Connection-Options */
50 __u32 max_xmit;
51 __u16 server_uid;
52 __u16 tid;
54 /* The following are LANMAN 1.0 options */
55 __u16 secmode;
56 __u16 maxmux;
57 __u16 maxvcs;
58 __u16 rawmode;
59 __u32 sesskey;
61 /* The following are NT LM 0.12 options */
62 __u32 maxraw;
63 __u32 capabilities;
64 __s16 serverzone;
67 #ifdef __KERNEL__
69 #define SMB_NLS_MAXNAMELEN 20
70 struct smb_nls_codepage {
71 char local_name[SMB_NLS_MAXNAMELEN];
72 char remote_name[SMB_NLS_MAXNAMELEN];
76 #define SMB_MAXNAMELEN 255
77 #define SMB_MAXPATHLEN 1024
80 * Contains all relevant data on a SMB networked file.
82 struct smb_fattr {
83 __u16 attr;
85 unsigned long f_ino;
86 umode_t f_mode;
87 nlink_t f_nlink;
88 uid_t f_uid;
89 gid_t f_gid;
90 dev_t f_rdev;
91 loff_t f_size;
92 struct timespec f_atime;
93 struct timespec f_mtime;
94 struct timespec f_ctime;
95 unsigned long f_blocks;
96 int f_unix;
99 enum smb_conn_state {
100 CONN_VALID, /* everything's fine */
101 CONN_INVALID, /* Something went wrong, but did not
102 try to reconnect yet. */
103 CONN_RETRIED, /* Tried a reconnection, but was refused */
104 CONN_RETRYING /* Currently trying to reconnect */
107 #define SMB_HEADER_LEN 37 /* includes everything up to, but not
108 * including smb_bcc */
110 #define SMB_INITIAL_PACKET_SIZE 4000
111 #define SMB_MAX_PACKET_SIZE 32768
113 /* reserve this much space for trans2 parameters. Shouldn't have to be more
114 than 10 or so, but OS/2 seems happier like this. */
115 #define SMB_TRANS2_MAX_PARAM 64
117 #endif
118 #endif