- Stephen Rothwell: APM updates
[davej-history.git] / include / linux / smb_fs_sb.h
blob0d14b83ae52a92d5c352e9dd64f06fe34ea479f2
1 /*
2 * smb_fs_sb.h
4 * Copyright (C) 1995 by Paal-Kr. Engstad and Volker Lendecke
5 * Copyright (C) 1997 by Volker Lendecke
7 */
9 #ifndef _SMB_FS_SB
10 #define _SMB_FS_SB
12 #ifdef __KERNEL__
14 #include <linux/types.h>
15 #include <linux/smb.h>
17 /* structure access macros */
18 #define server_from_inode(inode) (&(inode)->i_sb->u.smbfs_sb)
19 #define server_from_dentry(dentry) (&(dentry)->d_sb->u.smbfs_sb)
20 #define SB_of(server) ((struct super_block *) ((char *)(server) - \
21 (unsigned long)(&((struct super_block *)0)->u.smbfs_sb)))
23 struct smb_sb_info {
24 enum smb_conn_state state;
25 struct file * sock_file;
27 struct smb_mount_data_kernel *mnt;
28 unsigned char *temp_buf;
30 /* Connections are counted. Each time a new socket arrives,
31 * generation is incremented.
33 unsigned int generation;
34 pid_t conn_pid;
35 struct smb_conn_opt opt;
37 struct semaphore sem;
38 wait_queue_head_t wait;
40 __u32 packet_size;
41 unsigned char * packet;
42 unsigned short rcls; /* The error codes we received */
43 unsigned short err;
45 /* We use our own data_ready callback, but need the original one */
46 void *data_ready;
48 /* nls pointers for codepage conversions */
49 struct nls_table *remote_nls;
50 struct nls_table *local_nls;
52 /* utf8 can make strings longer so we can't do in-place conversion.
53 This is a buffer for temporary stuff. We only need one so no need
54 to put it on the stack. This points to temp_buf space. */
55 char *name_buf;
57 int (*convert)(char *, int, const char *, int,
58 struct nls_table *, struct nls_table *);
61 #endif /* __KERNEL__ */
63 #endif