4 * Copyright (C) 1995, 1996 by Volker Lendecke
11 #include <linux/types.h>
12 #include <linux/ncp_mount.h>
16 #define NCP_DEFAULT_OPTIONS 0 /* 2 for packet signatures */
20 struct ncp_mount_data_kernel m
; /* Nearly all of the mount data is of
21 interest for us later, so we store
24 __u8 name_space
[NCP_NUMBER_OF_VOLUMES
+ 2];
26 struct file
*ncp_filp
; /* File pointer to ncp socket */
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 */
42 unsigned char *packet
; /* Here we prepare requests and
45 int lock
; /* To prevent mismatch in protocols. */
48 int current_size
; /* for packet preparation */
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 */
60 /* Authentication info: NDS or BINDERY, username */
63 size_t object_name_len
;
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 */
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__ */