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