Changeset 67781 in vbox for trunk/include/iprt
- Timestamp:
- Jul 4, 2017 3:23:06 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 116693
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/iso9660.h
r67775 r67781 1040 1040 * @a cchDescription chars of description string, thrid @a cchSource chars 1041 1041 * of source string. Variable length. */ 1042 char achPayload[ 1];1042 char achPayload[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1043 1043 } ISO9660SUSPER; 1044 AssertCompile Size(ISO9660SUSPER, 9);1044 AssertCompileMemberOffset(ISO9660SUSPER, achPayload, 8); 1045 1045 /** Pointer to a SUSP padding entry. */ 1046 1046 typedef ISO9660SUSPER *PISO9660SUSPER; … … 1058 1058 typedef struct ISO9660SUSPES 1059 1059 { 1060 /** Header (ISO9660SUSPE R_SIG1, ISO9660SUSPER_SIG2, ISO9660SUSPER_VER). */1060 /** Header (ISO9660SUSPES_SIG1, ISO9660SUSPES_SIG2, ISO9660SUSPES_VER). */ 1061 1061 ISO9660SUSPHDR Hdr; 1062 1062 /** The ER entry sequence number of the extension comming first. */ … … 1074 1074 1075 1075 1076 /** RRIP ER identifier string from Rock Ridge Interchange Protocol v1.10 specs. */ 1077 #define ISO9660_RRIP_ID "RRIP_1991A" 1078 /** RRIP ER recommended description string (from RRIP v1.10 specs). */ 1079 #define ISO9660_RRIP_DESC "THE ROCK RIDGE INTERCHANGE PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS" 1080 /** RRIP ER recommended source string (from RRIP v1.10 specs). */ 1081 #define ISO9660_RRIP_SRC "PLEASE CONTACT DISC PUBLISHER FOR SPECIFICATION SOURCE. SEE PUBLISHER IDENTIFIER IN PRIMARY VOLUME DESCRIPTOR FOR CONTACT INFORMATION." 1082 1083 /** RRIP ER identifier string from RRIP IEEE P1282 v1.12 draft. */ 1084 #define ISO9660_RRIP_1_12_ID "IEEE_P1282" 1085 /** RRIP ER recommended description string (RRIP IEEE P1282 v1.12 draft). */ 1086 #define ISO9660_RRIP_1_12_DESC "THE IEEE P1282 PROTOCOL PROVIDES SUPPORT FOR POSIX FILE SYSTEM SEMANTICS." 1087 /** RRIP ER recommended source string (RRIP IEEE P1282 v1.12 draft). */ 1088 #define ISO9660_RRIP_1_12_SRC "PLEASE CONTACT THE IEEE STANDARDS DEPARTMENT, PISCATAWAY, NJ, USA FOR THE P1282 SPECIFICATION." 1089 1090 /** 1091 * Rock ridge interchange protocol - posix attribute entry (PX). 1092 */ 1093 typedef struct ISO9660RRIPPX 1094 { 1095 /** Header (ISO9660RRIPPX_SIG1, ISO9660RRIPPX_SIG2, 1096 * ISO9660RRIPPX_LEN, ISO9660RRIPPX_VER). */ 1097 ISO9660SUSPHDR Hdr; 1098 /** The file mode (RTFS_UNIX_XXX, RTFS_TYPE_XXX). */ 1099 ISO9660U32 fMode; 1100 /** Number of hardlinks. */ 1101 ISO9660U32 cHardlinks; 1102 /** User ID. */ 1103 ISO9660U32 uid; 1104 /** Group ID. */ 1105 ISO9660U32 gid; 1106 /** Inode number. */ 1107 ISO9660U32 INode; 1108 } ISO9660RRIPPX; 1109 AssertCompileSize(ISO9660RRIPPX, 44); 1110 /** Pointer to a RRIP posix attribute entry. */ 1111 typedef ISO9660RRIPPX *PISO9660RRIPPX; 1112 /** Pointer to a const RRIP posix attribute entry. */ 1113 typedef ISO9660RRIPPX const *PCISO9660RRIPPX; 1114 #define ISO9660RRIPPX_SIG1 'P' /**< RRIP posix attribute entry signature byte 1. */ 1115 #define ISO9660RRIPPX_SIG2 'X' /**< RRIP posix attribute entry signature byte 2. */ 1116 #define ISO9660RRIPPX_VER 1 /**< RRIP posix attribute entry version number. */ 1117 #define ISO9660RRIPPX_LEN 44 /**< RRIP posix attribute entry length (fixed). */ 1118 1119 1120 /** 1121 * Rock ridge interchange protocol - timestamp entry (TF). 1122 */ 1123 typedef struct ISO9660RRIPTF 1124 { 1125 /** Header (ISO9660RRIPTF_SIG1, ISO9660RRIPTF_SIG2, ISO9660RRIPTF_VER). */ 1126 ISO9660SUSPHDR Hdr; 1127 /** Flags, ISO9660RRIPTF_F_XXX. */ 1128 uint8_t fFlags; 1129 /** Timestamp payload bytes (variable size and format). */ 1130 uint8_t abPayload[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1131 } ISO9660RRIPTF; 1132 AssertCompileMemberOffset(ISO9660RRIPTF, abPayload, 5); 1133 /** Pointer to a RRIP timestamp entry. */ 1134 typedef ISO9660RRIPTF *PISO9660RRIPTF; 1135 /** Pointer to a const RRIP timestamp entry. */ 1136 typedef ISO9660RRIPTF const *PCISO9660RRIPTF; 1137 #define ISO9660RRIPTF_SIG1 'T' /**< RRIP child link entry signature byte 1. */ 1138 #define ISO9660RRIPTF_SIG2 'F' /**< RRIP child link entry signature byte 2. */ 1139 #define ISO9660RRIPTF_VER 1 /**< RRIP child link entry version number. */ 1140 1141 /** @name ISO9660RRIPTF_F_XXX - Timestmap flags. 1142 * @{ */ 1143 #define ISO9660RRIPTF_F_BIRTH UINT8_C(0x01) /**< Birth (creation) timestamp is recorded. */ 1144 #define ISO9660RRIPTF_F_MODIFY UINT8_C(0x02) /**< Modification timestamp is recorded. */ 1145 #define ISO9660RRIPTF_F_ACCESS UINT8_C(0x04) /**< Accessed timestamp is recorded. */ 1146 #define ISO9660RRIPTF_F_CHANGE UINT8_C(0x08) /**< Attribute change timestamp is recorded. */ 1147 #define ISO9660RRIPTF_F_BACKUP UINT8_C(0x10) /**< Backup timestamp is recorded. */ 1148 #define ISO9660RRIPTF_F_EXPIRATION UINT8_C(0x20) /**< Expiration timestamp is recorded. */ 1149 #define ISO9660RRIPTF_F_EFFECTIVE UINT8_C(0x40) /**< Effective timestamp is recorded. */ 1150 #define ISO9660RRIPTF_F_LONG_FORM UINT8_C(0x80) /**< If set ISO9660TIMESTAMP is used, otherwise ISO9660RECTIMESTAMP. */ 1151 /** @} */ 1152 1153 1154 /** 1155 * Rock ridge interchange protocol - posix device number entry (PN). 1156 * 1157 * Mandatory for block or character devices. 1158 */ 1159 typedef struct ISO9660RRIPPN 1160 { 1161 /** Header (ISO9660RRIPPN_SIG1, ISO9660RRIPPN_SIG2, 1162 * ISO9660RRIPPN_LEN, ISO9660RRIPPN_VER). */ 1163 ISO9660SUSPHDR Hdr; 1164 /** The major device number. */ 1165 ISO9660U32 Major; 1166 /** The minor device number. */ 1167 ISO9660U32 Minor; 1168 } ISO9660RRIPPN; 1169 AssertCompileSize(ISO9660RRIPPN, 20); 1170 /** Pointer to a RRIP posix attribute entry. */ 1171 typedef ISO9660RRIPPN *PISO9660RRIPPN; 1172 /** Pointer to a const RRIP posix attribute entry. */ 1173 typedef ISO9660RRIPPN const *PCISO9660RRIPPN; 1174 #define ISO9660RRIPPN_SIG1 'P' /**< RRIP posix device number entry signature byte 1. */ 1175 #define ISO9660RRIPPN_SIG2 'N' /**< RRIP posix device number entry signature byte 2. */ 1176 #define ISO9660RRIPPN_VER 1 /**< RRIP posix device number entry version number. */ 1177 #define ISO9660RRIPPN_LEN 20 /**< RRIP posix device number entry length (fixed). */ 1178 1179 /** 1180 * Rock ridge interchange protocol - symlink entry (SL). 1181 * 1182 * Mandatory for symbolic links. 1183 */ 1184 typedef struct ISO9660RRIPSL 1185 { 1186 /** Header (ISO9660RRIPSL_SIG1, ISO9660RRIPSL_SIG2, ISO9660RRIPSL_VER). */ 1187 ISO9660SUSPHDR Hdr; 1188 /** Flags (0 or ISO9660RRIP_SL_F_CONTINUE). */ 1189 uint8_t fFlags; 1190 /** Variable length of components. First byte in each component is a 1191 * combination of ISO9660RRIP_SL_C_XXX flag values. The second byte the 1192 * length of character data following it. */ 1193 uint8_t abComponents[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1194 } ISO9660RRIPSL; 1195 AssertCompileMemberOffset(ISO9660RRIPSL, abComponents, 5); 1196 /** Pointer to a RRIP symbolic link entry. */ 1197 typedef ISO9660RRIPSL *PISO9660RRIPSL; 1198 /** Pointer to a const RRIP symbolic link entry. */ 1199 typedef ISO9660RRIPSL const *PCISO9660RRIPSL; 1200 #define ISO9660RRIPSL_SIG1 'S' /**< RRIP symbolic link entry signature byte 1. */ 1201 #define ISO9660RRIPSL_SIG2 'L' /**< RRIP symbolic link entry signature byte 2. */ 1202 #define ISO9660RRIPSL_VER 1 /**< RRIP symbolic link entry version number. */ 1203 /** ISO9660RRIPSL.fFlags - When set another symlink entry follows this one. */ 1204 #define ISO9660RRIP_SL_F_CONTINUE UINT8_C(0x01) 1205 /** @name ISO9660RRIP_SL_C_XXX - Symlink component flags. 1206 * @note These matches ISO9660RRIP_NM_F_XXX. 1207 * @{ */ 1208 /** Indicates there are more components. */ 1209 #define ISO9660RRIP_SL_C_CONTINUE UINT8_C(0x01) 1210 /** Refer to '.' (the current dir). */ 1211 #define ISO9660RRIP_SL_C_CURRENT UINT8_C(0x02) 1212 /** Refer to '..' (the parent dir). */ 1213 #define ISO9660RRIP_SL_C_PARENT UINT8_C(0x04) 1214 /** Refer to '/' (the root dir). */ 1215 #define ISO9660RRIP_SL_C_ROOT UINT8_C(0x08) 1216 /** Reserved / historically was mount point reference. */ 1217 #define ISO9660RRIP_SL_C_MOUNT_POINT UINT8_C(0x10) 1218 /** Reserved / historically was uname network node name. */ 1219 #define ISO9660RRIP_SL_C_UNAME UINT8_C(0x20) 1220 /** @} */ 1221 1222 1223 /** 1224 * Rock ridge interchange protocol - name entry (NM). 1225 */ 1226 typedef struct ISO9660RRIPNM 1227 { 1228 /** Header (ISO9660RRIPNM_SIG1, ISO9660RRIPNM_SIG2, ISO9660RRIPNM_VER). */ 1229 ISO9660SUSPHDR Hdr; 1230 /** Flags (ISO9660RRIP_NM_F_XXX). */ 1231 uint8_t fFlags; 1232 /** The name part (if any). */ 1233 char achName[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1234 } ISO9660RRIPNM; 1235 AssertCompileMemberOffset(ISO9660RRIPNM, achName, 5); 1236 /** Pointer to a RRIP name entry. */ 1237 typedef ISO9660RRIPNM *PISO9660RRIPNM; 1238 /** Pointer to a const RRIP name entry. */ 1239 typedef ISO9660RRIPNM const *PCISO9660RRIPNM; 1240 #define ISO9660RRIPNM_SIG1 'N' /**< RRIP name entry signature byte 1. */ 1241 #define ISO9660RRIPNM_SIG2 'M' /**< RRIP name entry signature byte 2. */ 1242 #define ISO9660RRIPNM_VER 1 /**< RRIP name entry version number. */ 1243 /** @name ISO9660RRIP_NM_F_XXX - Name flags. 1244 * @note These matches ISO9660RRIP_SL_C_XXX. 1245 * @{ */ 1246 /** Indicates there are more 'NM' entries. */ 1247 #define ISO9660RRIP_NM_F_CONTINUE UINT8_C(0x01) 1248 /** Refer to '.' (the current dir). */ 1249 #define ISO9660RRIP_NM_F_CURRENT UINT8_C(0x02) 1250 /** Refer to '..' (the parent dir). */ 1251 #define ISO9660RRIP_NM_F_PARENT UINT8_C(0x04) 1252 /** Reserved / historically was uname network node name. */ 1253 #define ISO9660RRIP_NM_F_UNAME UINT8_C(0x20) 1254 /** @} */ 1255 1256 1257 /** 1258 * Rock ridge interchange protocol - child link entry (CL). 1259 * 1260 * This is used for relocated directories. Relocated directries are employed 1261 * to bypass the ISO 9660 maximum tree depth of 8. 1262 * 1263 * The size of the directory and everything else is found in the '.' entry in 1264 * the specified location. Only the name (NM or dir rec) and this link record 1265 * should be used. 1266 */ 1267 typedef struct ISO9660RRIPCL 1268 { 1269 /** Header (ISO9660RRIPCL_SIG1, ISO9660RRIPCL_SIG2, 1270 * ISO9660RRIPCL_LEN, ISO9660RRIPCL_VER). */ 1271 ISO9660SUSPHDR Hdr; 1272 /** The offset of the directory data (block offset). */ 1273 ISO9660U32 offExtend; 1274 } ISO9660RRIPCL; 1275 AssertCompileSize(ISO9660RRIPCL, 12); 1276 /** Pointer to a RRIP child link entry. */ 1277 typedef ISO9660RRIPCL *PISO9660RRIPCL; 1278 /** Pointer to a const RRIP child link entry. */ 1279 typedef ISO9660RRIPCL const *PCISO9660RRIPCL; 1280 #define ISO9660RRIPCL_SIG1 'C' /**< RRIP child link entry signature byte 1. */ 1281 #define ISO9660RRIPCL_SIG2 'L' /**< RRIP child link entry signature byte 2. */ 1282 #define ISO9660RRIPCL_VER 1 /**< RRIP child link entry version number. */ 1283 #define ISO9660RRIPCL_LEN 12 /**< RRIP child link entry length. */ 1284 1285 1286 /** 1287 * Rock ridge interchange protocol - parent link entry (PL). 1288 * 1289 * This is used in relocated directories. Relocated directries are employed 1290 * to bypass the ISO 9660 maximum tree depth of 8. 1291 * 1292 * The size of the directory and everything else is found in the '.' entry in 1293 * the specified location. Only the name (NM or dir rec) and this link record 1294 * should be used. 1295 */ 1296 typedef struct ISO9660RRIPPL 1297 { 1298 /** Header (ISO9660RRIPPL_SIG1, ISO9660RRIPPL_SIG2, 1299 * ISO9660RRIPPL_LEN, ISO9660RRIPPL_VER). */ 1300 ISO9660SUSPHDR Hdr; 1301 /** The offset of the directory data (block offset). */ 1302 ISO9660U32 offExtend; 1303 } ISO9660RRIPPL; 1304 AssertCompileSize(ISO9660RRIPPL, 12); 1305 /** Pointer to a RRIP parent link entry. */ 1306 typedef ISO9660RRIPPL *PISO9660RRIPPL; 1307 /** Pointer to a const RRIP parent link entry. */ 1308 typedef ISO9660RRIPPL const *PCISO9660RRIPPL; 1309 #define ISO9660RRIPPL_SIG1 'P' /**< RRIP parent link entry signature byte 1. */ 1310 #define ISO9660RRIPPL_SIG2 'L' /**< RRIP parent link entry signature byte 2. */ 1311 #define ISO9660RRIPPL_VER 1 /**< RRIP parent link entry version number. */ 1312 #define ISO9660RRIPPL_LEN 12 /**< RRIP parent link entry length. */ 1313 1314 1315 /** 1316 * Rock ridge interchange protocol - relocated entry (RE). 1317 * 1318 * This is used in the directory record for a relocated directory in the 1319 * holding place high up in the directory hierarchy. The system may choose to 1320 * ignore/hide entries with this entry present. 1321 */ 1322 typedef struct ISO9660RRIPRE 1323 { 1324 /** Header (ISO9660RRIPRE_SIG1, ISO9660RRIPRE_SIG2, 1325 * ISO9660RRIPRE_LEN, ISO9660RRIPRE_VER). */ 1326 ISO9660SUSPHDR Hdr; 1327 } ISO9660RRIPRE; 1328 AssertCompileSize(ISO9660RRIPRE, 4); 1329 /** Pointer to a RRIP parent link entry. */ 1330 typedef ISO9660RRIPRE *PISO9660RRIPRE; 1331 /** Pointer to a const RRIP parent link entry. */ 1332 typedef ISO9660RRIPRE const *PCISO9660RRIPRE; 1333 #define ISO9660RRIPRE_SIG1 'R' /**< RRIP relocated entry signature byte 1. */ 1334 #define ISO9660RRIPRE_SIG2 'E' /**< RRIP relocated entry signature byte 2. */ 1335 #define ISO9660RRIPRE_VER 1 /**< RRIP relocated entry version number. */ 1336 #define ISO9660RRIPRE_LEN 4 /**< RRIP relocated entry length. */ 1337 1338 1339 /** 1340 * Rock ridge interchange protocol - sparse file entry (SF). 1341 */ 1342 #pragma pack(1) 1343 typedef struct ISO9660RRIPSF 1344 { 1345 /** Header (ISO9660RRIPSF_SIG1, ISO9660RRIPSF_SIG2, 1346 * ISO9660RRIPSF_LEN, ISO9660RRIPSF_VER). */ 1347 ISO9660SUSPHDR Hdr; 1348 /** The high 32-bits of the 64-bit sparse file size. */ 1349 ISO9660U32 cbSparseHi; 1350 /** The low 32-bits of the 64-bit sparse file size. */ 1351 ISO9660U32 cbSparseLo; 1352 /** The table depth. */ 1353 uint8_t cDepth; 1354 } ISO9660RRIPSF; 1355 #pragma pack() 1356 AssertCompileSize(ISO9660RRIPSF, 21); 1357 /** Pointer to a RRIP symbolic link entry. */ 1358 typedef ISO9660RRIPSF *PISO9660RRIPSF; 1359 /** Pointer to a const RRIP symbolic link entry. */ 1360 typedef ISO9660RRIPSF const *PCISO9660RRIPSF; 1361 #define ISO9660RRIPSF_SIG1 'S' /**< RRIP spare file entry signature byte 1. */ 1362 #define ISO9660RRIPSF_SIG2 'F' /**< RRIP spare file entry signature byte 2. */ 1363 #define ISO9660RRIPSF_VER 1 /**< RRIP spare file entry version number. */ 1364 #define ISO9660RRIPSF_LEN 21 /**< RRIP spare file entry length. */ 1365 1366 /** @name ISO9660RRIP_SF_TAB_F_XXX - Sparse table format. 1367 * @{ */ 1368 /** The 24-bit logical block number mask. 1369 * This is somewhat complicated, see docs. MBZ for EMPTY. */ 1370 #define ISO9660RRIP_SF_TAB_F_BLOCK_MASK UINT32_C(0x00ffffff) 1371 /** Reserved bits, MBZ. */ 1372 #define ISO9660RRIP_SF_TAB_F_RESERVED RT_BIT_32() 1373 /** References a sub-table with 256 entries (ISO9660U32). */ 1374 #define ISO9660RRIP_SF_TAB_F_TABLE RT_BIT_32(30) 1375 /** Zero data region. */ 1376 #define ISO9660RRIP_SF_TAB_F_EMPTY RT_BIT_32(31) 1377 /** @} */ 1378 1379 1076 1380 /** 1077 1381 * SUSP and RRIP union. … … 1086 1390 ISO9660SUSPER ER; /**< SUSP extension record entry. */ 1087 1391 ISO9660SUSPES ES; /**< SUSP extension sequence entry. */ 1392 ISO9660RRIPPX PX; /**< RRIP posix attribute entry. */ 1393 ISO9660RRIPTF TF; /**< RRIP timestamp entry. */ 1394 ISO9660RRIPPN PN; /**< RRIP posix device number entry. */ 1395 ISO9660RRIPSF SF; /**< RRIP sparse file entry. */ 1396 ISO9660RRIPSL SL; /**< RRIP symbolic link entry. */ 1397 ISO9660RRIPNM NM; /**< RRIP name entry. */ 1398 ISO9660RRIPCL CL; /**< RRIP child link entry. */ 1399 ISO9660RRIPPL PL; /**< RRIP parent link entry. */ 1400 ISO9660RRIPRE RE; /**< RRIP relocated entry. */ 1088 1401 } ISO9660SUSPUNION; 1089 1402 /** Pointer to a SUSP and RRIP union. */ … … 1092 1405 typedef ISO9660SUSPUNION *PCISO9660SUSPUNION; 1093 1406 1407 1094 1408 /** @} */ 1095 1409
Note:
See TracChangeset
for help on using the changeset viewer.