mm/vmstat.c: proper externs
[linux-2.6/mini2440.git] / include / linux / smb.h
blobcaa43b2370cb04b6b12e7aa47d398e35dbfbedb3
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 #include <linux/time.h>
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
25 enum smb_case_hndl {
26 SMB_CASE_DEFAULT,
27 SMB_CASE_LOWER,
28 SMB_CASE_UPPER
31 struct smb_dskattr {
32 __u16 total;
33 __u16 allocblocks;
34 __u16 blocksize;
35 __u16 free;
38 struct smb_conn_opt {
40 /* The socket */
41 unsigned int fd;
43 enum smb_protocol protocol;
44 enum smb_case_hndl case_handling;
46 /* Connection-Options */
48 __u32 max_xmit;
49 __u16 server_uid;
50 __u16 tid;
52 /* The following are LANMAN 1.0 options */
53 __u16 secmode;
54 __u16 maxmux;
55 __u16 maxvcs;
56 __u16 rawmode;
57 __u32 sesskey;
59 /* The following are NT LM 0.12 options */
60 __u32 maxraw;
61 __u32 capabilities;
62 __s16 serverzone;
65 #ifdef __KERNEL__
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];
74 #define SMB_MAXNAMELEN 255
75 #define SMB_MAXPATHLEN 1024
78 * Contains all relevant data on a SMB networked file.
80 struct smb_fattr {
81 __u16 attr;
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;
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 */
105 #define SMB_HEADER_LEN 37 /* includes everything up to, but not
106 * including smb_bcc */
108 #define SMB_INITIAL_PACKET_SIZE 4000
109 #define SMB_MAX_PACKET_SIZE 32768
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
115 #endif
116 #endif