sparc64: Fix missing devices due to PCI bridge test in of_create_pci_dev().
[pandora-kernel.git] / include / linux / smb.h
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 #include <linux/magic.h>
14 #include <linux/time.h>
15
16 enum smb_protocol { 
17         SMB_PROTOCOL_NONE, 
18         SMB_PROTOCOL_CORE, 
19         SMB_PROTOCOL_COREPLUS, 
20         SMB_PROTOCOL_LANMAN1, 
21         SMB_PROTOCOL_LANMAN2, 
22         SMB_PROTOCOL_NT1 
23 };
24
25 enum smb_case_hndl {
26         SMB_CASE_DEFAULT,
27         SMB_CASE_LOWER,
28         SMB_CASE_UPPER
29 };
30
31 struct smb_dskattr {
32         __u16 total;
33         __u16 allocblocks;
34         __u16 blocksize;
35         __u16 free;
36 };
37
38 struct smb_conn_opt {
39
40         /* The socket */
41         unsigned int fd;
42
43         enum smb_protocol protocol;
44         enum smb_case_hndl case_handling;
45
46         /* Connection-Options */
47
48         __u32              max_xmit;
49         __u16              server_uid;
50         __u16              tid;
51
52         /* The following are LANMAN 1.0 options */
53         __u16              secmode;
54         __u16              maxmux;
55         __u16              maxvcs;
56         __u16              rawmode;
57         __u32              sesskey;
58
59         /* The following are NT LM 0.12 options */
60         __u32              maxraw;
61         __u32              capabilities;
62         __s16              serverzone;
63 };
64
65 #ifdef __KERNEL__
66
67 #define SMB_NLS_MAXNAMELEN 20
68 struct smb_nls_codepage {
69         char local_name[SMB_NLS_MAXNAMELEN];
70         char remote_name[SMB_NLS_MAXNAMELEN];
71 };
72
73
74 #define SMB_MAXNAMELEN 255
75 #define SMB_MAXPATHLEN 1024
76
77 /*
78  * Contains all relevant data on a SMB networked file.
79  */
80 struct smb_fattr {
81         __u16 attr;
82
83         unsigned long   f_ino;
84         umode_t         f_mode;
85         nlink_t         f_nlink;
86         uid_t           f_uid;
87         gid_t           f_gid;
88         dev_t           f_rdev;
89         loff_t          f_size;
90         struct timespec f_atime;
91         struct timespec f_mtime;
92         struct timespec f_ctime;
93         unsigned long   f_blocks;
94         int             f_unix;
95 };
96
97 enum smb_conn_state {
98         CONN_VALID,             /* everything's fine */
99         CONN_INVALID,           /* Something went wrong, but did not
100                                    try to reconnect yet. */
101         CONN_RETRIED,           /* Tried a reconnection, but was refused */
102         CONN_RETRYING           /* Currently trying to reconnect */
103 };
104
105 #define SMB_HEADER_LEN   37     /* includes everything up to, but not
106                                  * including smb_bcc */
107
108 #define SMB_INITIAL_PACKET_SIZE         4000
109 #define SMB_MAX_PACKET_SIZE             32768
110
111 /* reserve this much space for trans2 parameters. Shouldn't have to be more
112    than 10 or so, but OS/2 seems happier like this. */
113 #define SMB_TRANS2_MAX_PARAM 64
114
115 #endif
116 #endif