More Makefile cleanups, otherwise mainly noticeable are the netfilter fix
[davej-history.git] / include / linux / ncp_fs_sb.h
blobfe250aba1c59a930bb125d0b577bc5be4f9126de
1 /*
2 * ncp_fs_sb.h
4 * Copyright (C) 1995, 1996 by Volker Lendecke
6 */
8 #ifndef _NCP_FS_SB
9 #define _NCP_FS_SB
11 #include <linux/types.h>
12 #include <linux/ncp_mount.h>
14 #ifdef __KERNEL__
16 #define NCP_DEFAULT_OPTIONS 0 /* 2 for packet signatures */
18 struct ncp_server {
20 struct ncp_mount_data_kernel m; /* Nearly all of the mount data is of
21 interest for us later, so we store
22 it completely. */
24 __u8 name_space[NCP_NUMBER_OF_VOLUMES + 2];
26 struct file *ncp_filp; /* File pointer to ncp socket */
28 u8 sequence;
29 u8 task;
30 u16 connection; /* Remote connection number */
32 u8 completion; /* Status message from server */
33 u8 conn_status; /* Bit 4 = 1 ==> Server going down, no
34 requests allowed anymore.
35 Bit 0 = 1 ==> Server is down. */
37 int buffer_size; /* Negotiated bufsize */
39 int reply_size; /* Size of last reply */
41 int packet_size;
42 unsigned char *packet; /* Here we prepare requests and
43 receive replies */
45 int lock; /* To prevent mismatch in protocols. */
46 struct semaphore sem;
48 int current_size; /* for packet preparation */
49 int has_subfunction;
50 int ncp_reply_size;
52 int root_setuped;
54 /* info for packet signing */
55 int sign_wanted; /* 1=Server needs signed packets */
56 int sign_active; /* 0=don't do signing, 1=do */
57 char sign_root[8]; /* generated from password and encr. key */
58 char sign_last[16];
60 /* Authentication info: NDS or BINDERY, username */
61 struct {
62 int auth_type;
63 size_t object_name_len;
64 void* object_name;
65 int object_type;
66 } auth;
67 /* Password info */
68 struct {
69 size_t len;
70 void* data;
71 } priv;
73 /* nls info: codepage for volume and charset for I/O */
74 struct nls_table *nls_vol;
75 struct nls_table *nls_io;
77 /* maximum age in jiffies */
78 int dentry_ttl;
80 /* miscellaneous */
81 unsigned int flags;
84 #define ncp_sb_info ncp_server
86 #define NCP_FLAG_UTF8 1
88 #define NCP_CLR_FLAG(server, flag) ((server)->flags &= ~(flag))
89 #define NCP_SET_FLAG(server, flag) ((server)->flags |= (flag))
90 #define NCP_IS_FLAG(server, flag) ((server)->flags & (flag))
92 static inline int ncp_conn_valid(struct ncp_server *server)
94 return ((server->conn_status & 0x11) == 0);
97 static inline void ncp_invalidate_conn(struct ncp_server *server)
99 server->conn_status |= 0x01;
102 #endif /* __KERNEL__ */
104 #endif