PageRenderTime 63ms CodeModel.GetById 39ms RepoModel.GetById 1ms app.codeStats 0ms

/aarch64-linux-gnu/libc/usr/include/linux/ncp.h

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