4 * Copyright (C) 1995, 1996 by Volker Lendecke
11 #include <linux/types.h>
12 #include <linux/ncp_mount.h>
16 #define NCP_DEFAULT_BUFSIZE 1024
17 #define NCP_DEFAULT_OPTIONS 0 /* 2 for packet signatures */
21 struct ncp_mount_data_kernel m
; /* Nearly all of the mount data is of
22 interest for us later, so we store
25 __u8 name_space
[NCP_NUMBER_OF_VOLUMES
+ 2];
27 struct file
*ncp_filp
; /* File pointer to ncp socket */
31 u16 connection
; /* Remote connection number */
33 u8 completion
; /* Status message from server */
34 u8 conn_status
; /* Bit 4 = 1 ==> Server going down, no
35 requests allowed anymore.
36 Bit 0 = 1 ==> Server is down. */
38 int buffer_size
; /* Negotiated bufsize */
40 int reply_size
; /* Size of last reply */
43 unsigned char *packet
; /* Here we prepare requests and
46 int lock
; /* To prevent mismatch in protocols. */
49 int current_size
; /* for packet preparation */
55 /* info for packet signing */
56 int sign_wanted
; /* 1=Server needs signed packets */
57 int sign_active
; /* 0=don't do signing, 1=do */
58 char sign_root
[8]; /* generated from password and encr. key */
61 /* Authentication info: NDS or BINDERY, username */
64 size_t object_name_len
;
74 /* nls info: codepage for volume and charset for I/O */
75 struct nls_table
*nls_vol
;
76 struct nls_table
*nls_io
;
78 /* maximum age in jiffies */
85 #define ncp_sb_info ncp_server
87 #define NCP_FLAG_UTF8 1
89 #define NCP_CLR_FLAG(server, flag) ((server)->flags &= ~(flag))
90 #define NCP_SET_FLAG(server, flag) ((server)->flags |= (flag))
91 #define NCP_IS_FLAG(server, flag) ((server)->flags & (flag))
93 static inline int ncp_conn_valid(struct ncp_server
*server
)
95 return ((server
->conn_status
& 0x11) == 0);
98 static inline void ncp_invalidate_conn(struct ncp_server
*server
)
100 server
->conn_status
|= 0x01;
103 #endif /* __KERNEL__ */