Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | *** To edit the content of this header, modify the corresponding |
| 11 | *** source file (e.g. under external/kernel-headers/original/) then |
| 12 | *** run bionic/libc/kernel/tools/update_all.py |
| 13 | *** |
| 14 | *** Any manual change here will be lost the next time this script will |
| 15 | *** be run. You've been warned! |
| 16 | *** |
| 17 | **************************************************************************** |
| 18 | ****************************************************************************/ |
| 19 | #ifndef _LINUX_NCP_FS_H |
| 20 | #define _LINUX_NCP_FS_H |
| 21 | #include <linux/fs.h> |
| 22 | #include <linux/in.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 23 | #include <linux/types.h> |
| 24 | #include <linux/magic.h> |
| 25 | #include <linux/ipx.h> |
| 26 | #include <linux/ncp_no.h> |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 27 | struct ncp_ioctl_request { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 28 | unsigned int function; |
| 29 | unsigned int size; |
| 30 | char __user * data; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 31 | }; |
| 32 | struct ncp_fs_info { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 33 | int version; |
| 34 | struct sockaddr_ipx addr; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 35 | __kernel_uid_t mounted_uid; |
| 36 | int connection; |
| 37 | int buffer_size; |
| 38 | int volume_number; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 39 | __le32 directory_id; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 40 | }; |
| 41 | struct ncp_fs_info_v2 { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 42 | int version; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 43 | unsigned long mounted_uid; |
| 44 | unsigned int connection; |
| 45 | unsigned int buffer_size; |
| 46 | unsigned int volume_number; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 47 | __le32 directory_id; |
| 48 | __u32 dummy1; |
| 49 | __u32 dummy2; |
| 50 | __u32 dummy3; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 51 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 52 | struct ncp_sign_init { |
| 53 | char sign_root[8]; |
| 54 | char sign_last[16]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 55 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 56 | struct ncp_lock_ioctl { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 57 | #define NCP_LOCK_LOG 0 |
| 58 | #define NCP_LOCK_SH 1 |
| 59 | #define NCP_LOCK_EX 2 |
| 60 | #define NCP_LOCK_CLEAR 256 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 61 | int cmd; |
| 62 | int origin; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 63 | unsigned int offset; |
| 64 | unsigned int length; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 65 | #define NCP_LOCK_DEFAULT_TIMEOUT 18 |
| 66 | #define NCP_LOCK_MAX_TIMEOUT 180 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 67 | int timeout; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 68 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 69 | struct ncp_setroot_ioctl { |
| 70 | int volNumber; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 71 | int namespace; |
| 72 | __le32 dirEntNum; |
| 73 | }; |
| 74 | struct ncp_objectname_ioctl { |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 75 | #define NCP_AUTH_NONE 0x00 |
| 76 | #define NCP_AUTH_BIND 0x31 |
| 77 | #define NCP_AUTH_NDS 0x32 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 78 | int auth_type; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 79 | size_t object_name_len; |
| 80 | void __user * object_name; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 81 | }; |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 82 | struct ncp_privatedata_ioctl { |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 83 | size_t len; |
| 84 | void __user * data; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 85 | }; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 86 | #define NCP_IOCSNAME_LEN 20 |
Tao Bao | d7db594 | 2015-01-28 10:07:51 -0800 | [diff] [blame] | 87 | struct ncp_nls_ioctl { |
| 88 | unsigned char codepage[NCP_IOCSNAME_LEN + 1]; |
| 89 | unsigned char iocharset[NCP_IOCSNAME_LEN + 1]; |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 90 | }; |
| 91 | #define NCP_IOC_NCPREQUEST _IOR('n', 1, struct ncp_ioctl_request) |
| 92 | #define NCP_IOC_GETMOUNTUID _IOW('n', 2, __kernel_old_uid_t) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 93 | #define NCP_IOC_GETMOUNTUID2 _IOW('n', 2, unsigned long) |
| 94 | #define NCP_IOC_CONN_LOGGED_IN _IO('n', 3) |
| 95 | #define NCP_GET_FS_INFO_VERSION (1) |
| 96 | #define NCP_IOC_GET_FS_INFO _IOWR('n', 4, struct ncp_fs_info) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 97 | #define NCP_GET_FS_INFO_VERSION_V2 (2) |
| 98 | #define NCP_IOC_GET_FS_INFO_V2 _IOWR('n', 4, struct ncp_fs_info_v2) |
| 99 | #define NCP_IOC_SIGN_INIT _IOR('n', 5, struct ncp_sign_init) |
| 100 | #define NCP_IOC_SIGN_WANTED _IOR('n', 6, int) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 101 | #define NCP_IOC_SET_SIGN_WANTED _IOW('n', 6, int) |
| 102 | #define NCP_IOC_LOCKUNLOCK _IOR('n', 7, struct ncp_lock_ioctl) |
| 103 | #define NCP_IOC_GETROOT _IOW('n', 8, struct ncp_setroot_ioctl) |
| 104 | #define NCP_IOC_SETROOT _IOR('n', 8, struct ncp_setroot_ioctl) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 105 | #define NCP_IOC_GETOBJECTNAME _IOWR('n', 9, struct ncp_objectname_ioctl) |
| 106 | #define NCP_IOC_SETOBJECTNAME _IOR('n', 9, struct ncp_objectname_ioctl) |
| 107 | #define NCP_IOC_GETPRIVATEDATA _IOWR('n', 10, struct ncp_privatedata_ioctl) |
| 108 | #define NCP_IOC_SETPRIVATEDATA _IOR('n', 10, struct ncp_privatedata_ioctl) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 109 | #define NCP_IOC_GETCHARSETS _IOWR('n', 11, struct ncp_nls_ioctl) |
| 110 | #define NCP_IOC_SETCHARSETS _IOR('n', 11, struct ncp_nls_ioctl) |
| 111 | #define NCP_IOC_GETDENTRYTTL _IOW('n', 12, __u32) |
| 112 | #define NCP_IOC_SETDENTRYTTL _IOR('n', 12, __u32) |
Ben Cheng | 655a7c0 | 2013-10-16 16:09:24 -0700 | [diff] [blame] | 113 | #define NCP_PACKET_SIZE 4070 |
| 114 | #define NCP_MAXPATHLEN 255 |
| 115 | #define NCP_MAXNAMELEN 14 |
| 116 | #endif |