Dan Albert | 2a18e9f | 2018-05-17 09:13:22 -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_H |
| 20 | #define _LINUX_NCP_H |
| 21 | #include <linux/types.h> |
| 22 | #define NCP_PTYPE (0x11) |
| 23 | #define NCP_PORT (0x0451) |
| 24 | #define NCP_ALLOC_SLOT_REQUEST (0x1111) |
| 25 | #define NCP_REQUEST (0x2222) |
| 26 | #define NCP_DEALLOC_SLOT_REQUEST (0x5555) |
| 27 | struct ncp_request_header { |
| 28 | __u16 type; |
| 29 | __u8 sequence; |
| 30 | __u8 conn_low; |
| 31 | __u8 task; |
| 32 | __u8 conn_high; |
| 33 | __u8 function; |
| 34 | __u8 data[0]; |
| 35 | } __attribute__((packed)); |
| 36 | #define NCP_REPLY (0x3333) |
| 37 | #define NCP_WATCHDOG (0x3E3E) |
| 38 | #define NCP_POSITIVE_ACK (0x9999) |
| 39 | struct ncp_reply_header { |
| 40 | __u16 type; |
| 41 | __u8 sequence; |
| 42 | __u8 conn_low; |
| 43 | __u8 task; |
| 44 | __u8 conn_high; |
| 45 | __u8 completion_code; |
| 46 | __u8 connection_state; |
| 47 | __u8 data[0]; |
| 48 | } __attribute__((packed)); |
| 49 | #define NCP_VOLNAME_LEN (16) |
| 50 | #define NCP_NUMBER_OF_VOLUMES (256) |
| 51 | struct ncp_volume_info { |
| 52 | __u32 total_blocks; |
| 53 | __u32 free_blocks; |
| 54 | __u32 purgeable_blocks; |
| 55 | __u32 not_yet_purgeable_blocks; |
| 56 | __u32 total_dir_entries; |
| 57 | __u32 available_dir_entries; |
| 58 | __u8 sectors_per_block; |
| 59 | char volume_name[NCP_VOLNAME_LEN + 1]; |
| 60 | }; |
| 61 | #define AR_READ (cpu_to_le16(1)) |
| 62 | #define AR_WRITE (cpu_to_le16(2)) |
| 63 | #define AR_EXCLUSIVE (cpu_to_le16(0x20)) |
| 64 | #define NCP_FILE_ID_LEN 6 |
| 65 | #define NW_NS_DOS 0 |
| 66 | #define NW_NS_MAC 1 |
| 67 | #define NW_NS_NFS 2 |
| 68 | #define NW_NS_FTAM 3 |
| 69 | #define NW_NS_OS2 4 |
| 70 | #define RIM_NAME (cpu_to_le32(1)) |
| 71 | #define RIM_SPACE_ALLOCATED (cpu_to_le32(2)) |
| 72 | #define RIM_ATTRIBUTES (cpu_to_le32(4)) |
| 73 | #define RIM_DATA_SIZE (cpu_to_le32(8)) |
| 74 | #define RIM_TOTAL_SIZE (cpu_to_le32(0x10)) |
| 75 | #define RIM_EXT_ATTR_INFO (cpu_to_le32(0x20)) |
| 76 | #define RIM_ARCHIVE (cpu_to_le32(0x40)) |
| 77 | #define RIM_MODIFY (cpu_to_le32(0x80)) |
| 78 | #define RIM_CREATION (cpu_to_le32(0x100)) |
| 79 | #define RIM_OWNING_NAMESPACE (cpu_to_le32(0x200)) |
| 80 | #define RIM_DIRECTORY (cpu_to_le32(0x400)) |
| 81 | #define RIM_RIGHTS (cpu_to_le32(0x800)) |
| 82 | #define RIM_ALL (cpu_to_le32(0xFFF)) |
| 83 | #define RIM_COMPRESSED_INFO (cpu_to_le32(0x80000000)) |
| 84 | #define NSIBM_NFS_NAME 0x0001 |
| 85 | #define NSIBM_NFS_MODE 0x0002 |
| 86 | #define NSIBM_NFS_GID 0x0004 |
| 87 | #define NSIBM_NFS_NLINKS 0x0008 |
| 88 | #define NSIBM_NFS_RDEV 0x0010 |
| 89 | #define NSIBM_NFS_LINK 0x0020 |
| 90 | #define NSIBM_NFS_CREATED 0x0040 |
| 91 | #define NSIBM_NFS_UID 0x0080 |
| 92 | #define NSIBM_NFS_ACSFLAG 0x0100 |
| 93 | #define NSIBM_NFS_MYFLAG 0x0200 |
| 94 | #define OC_MODE_OPEN 0x01 |
| 95 | #define OC_MODE_TRUNCATE 0x02 |
| 96 | #define OC_MODE_REPLACE 0x02 |
| 97 | #define OC_MODE_CREATE 0x08 |
| 98 | #define OC_ACTION_NONE 0x00 |
| 99 | #define OC_ACTION_OPEN 0x01 |
| 100 | #define OC_ACTION_CREATE 0x02 |
| 101 | #define OC_ACTION_TRUNCATE 0x04 |
| 102 | #define OC_ACTION_REPLACE 0x04 |
| 103 | #ifndef AR_READ_ONLY |
| 104 | #define AR_READ_ONLY 0x0001 |
| 105 | #define AR_WRITE_ONLY 0x0002 |
| 106 | #define AR_DENY_READ 0x0004 |
| 107 | #define AR_DENY_WRITE 0x0008 |
| 108 | #define AR_COMPATIBILITY 0x0010 |
| 109 | #define AR_WRITE_THROUGH 0x0040 |
| 110 | #define AR_OPEN_COMPRESSED 0x0100 |
| 111 | #endif |
| 112 | struct nw_nfs_info { |
| 113 | __u32 mode; |
| 114 | __u32 rdev; |
| 115 | }; |
| 116 | struct nw_info_struct { |
| 117 | __u32 spaceAlloc; |
| 118 | __le32 attributes; |
| 119 | __u16 flags; |
| 120 | __le32 dataStreamSize; |
| 121 | __le32 totalStreamSize; |
| 122 | __u16 numberOfStreams; |
| 123 | __le16 creationTime; |
| 124 | __le16 creationDate; |
| 125 | __u32 creatorID; |
| 126 | __le16 modifyTime; |
| 127 | __le16 modifyDate; |
| 128 | __u32 modifierID; |
| 129 | __le16 lastAccessDate; |
| 130 | __u16 archiveTime; |
| 131 | __u16 archiveDate; |
| 132 | __u32 archiverID; |
| 133 | __u16 inheritedRightsMask; |
| 134 | __le32 dirEntNum; |
| 135 | __le32 DosDirNum; |
| 136 | __u32 volNumber; |
| 137 | __u32 EADataSize; |
| 138 | __u32 EAKeyCount; |
| 139 | __u32 EAKeySize; |
| 140 | __u32 NSCreator; |
| 141 | __u8 nameLen; |
| 142 | __u8 entryName[256]; |
| 143 | } __attribute__((packed)); |
| 144 | #define DM_ATTRIBUTES (cpu_to_le32(0x02)) |
| 145 | #define DM_CREATE_DATE (cpu_to_le32(0x04)) |
| 146 | #define DM_CREATE_TIME (cpu_to_le32(0x08)) |
| 147 | #define DM_CREATOR_ID (cpu_to_le32(0x10)) |
| 148 | #define DM_ARCHIVE_DATE (cpu_to_le32(0x20)) |
| 149 | #define DM_ARCHIVE_TIME (cpu_to_le32(0x40)) |
| 150 | #define DM_ARCHIVER_ID (cpu_to_le32(0x80)) |
| 151 | #define DM_MODIFY_DATE (cpu_to_le32(0x0100)) |
| 152 | #define DM_MODIFY_TIME (cpu_to_le32(0x0200)) |
| 153 | #define DM_MODIFIER_ID (cpu_to_le32(0x0400)) |
| 154 | #define DM_LAST_ACCESS_DATE (cpu_to_le32(0x0800)) |
| 155 | #define DM_INHERITED_RIGHTS_MASK (cpu_to_le32(0x1000)) |
| 156 | #define DM_MAXIMUM_SPACE (cpu_to_le32(0x2000)) |
| 157 | struct nw_modify_dos_info { |
| 158 | __le32 attributes; |
| 159 | __le16 creationDate; |
| 160 | __le16 creationTime; |
| 161 | __u32 creatorID; |
| 162 | __le16 modifyDate; |
| 163 | __le16 modifyTime; |
| 164 | __u32 modifierID; |
| 165 | __u16 archiveDate; |
| 166 | __u16 archiveTime; |
| 167 | __u32 archiverID; |
| 168 | __le16 lastAccessDate; |
| 169 | __u16 inheritanceGrantMask; |
| 170 | __u16 inheritanceRevokeMask; |
| 171 | __u32 maximumSpace; |
| 172 | } __attribute__((packed)); |
| 173 | struct nw_search_sequence { |
| 174 | __u8 volNumber; |
| 175 | __u32 dirBase; |
| 176 | __u32 sequence; |
| 177 | } __attribute__((packed)); |
| 178 | #endif |