1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
5 * Copyright (C) 1995, 1996 by Volker Lendecke
9 #ifndef _LINUX_NCP_FS_H
10 #define _LINUX_NCP_FS_H
14 #include <linux/types.h>
15 #include <linux/magic.h>
17 #include <linux/ipx.h>
18 #include <linux/ncp_no.h>
24 struct ncp_ioctl_request
{
25 unsigned int function
;
32 struct sockaddr_ipx addr
;
33 __kernel_uid_t mounted_uid
;
34 int connection
; /* Connection number the server assigned us */
35 int buffer_size
; /* The negotiated buffer size, to be
36 used for read/write requests! */
42 struct ncp_fs_info_v2
{
44 unsigned long mounted_uid
;
45 unsigned int connection
;
46 unsigned int buffer_size
;
48 unsigned int volume_number
;
64 #define NCP_LOCK_LOG 0
67 #define NCP_LOCK_CLEAR 256
72 #define NCP_LOCK_DEFAULT_TIMEOUT 18
73 #define NCP_LOCK_MAX_TIMEOUT 180
77 struct ncp_setroot_ioctl
84 struct ncp_objectname_ioctl
86 #define NCP_AUTH_NONE 0x00
87 #define NCP_AUTH_BIND 0x31
88 #define NCP_AUTH_NDS 0x32
90 size_t object_name_len
;
91 void __user
* object_name
; /* a userspace data, in most cases user name */
94 struct ncp_privatedata_ioctl
97 void __user
* data
; /* ~1000 for NDS */
100 /* NLS charsets by ioctl */
101 #define NCP_IOCSNAME_LEN 20
104 unsigned char codepage
[NCP_IOCSNAME_LEN
+1];
105 unsigned char iocharset
[NCP_IOCSNAME_LEN
+1];
108 #define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request)
109 #define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t)
110 #define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long)
112 #define NCP_IOC_CONN_LOGGED_IN _IO('n', 3)
114 #define NCP_GET_FS_INFO_VERSION (1)
115 #define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info)
116 #define NCP_GET_FS_INFO_VERSION_V2 (2)
117 #define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2)
119 #define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init)
120 #define NCP_IOC_SIGN_WANTED _IOR('n', 6, int)
121 #define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int)
123 #define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl)
125 #define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl)
126 #define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl)
128 #define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl)
129 #define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl)
130 #define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl)
131 #define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl)
133 #define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl)
134 #define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl)
136 #define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32)
137 #define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32)
140 * The packet size to allocate. One page should be enough.
142 #define NCP_PACKET_SIZE 4070
144 #define NCP_MAXPATHLEN 255
145 #define NCP_MAXNAMELEN 14
147 #endif /* _LINUX_NCP_FS_H */