Changeset 68407 in vbox for trunk/include/iprt
- Timestamp:
- Aug 14, 2017 10:50:47 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 117545
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/formats/udf.h
r68399 r68407 1039 1039 /** 0x14: Size of the following allocation descriptors (in bytes). */ 1040 1040 uint32_t cbAllocDescs; 1041 /** 0x18: Allocation descriptors. 1042 * @todo verify format... */ 1041 /** 0x18: Allocation descriptors. */ 1043 1042 union 1044 1043 { … … 1207 1206 1208 1207 /** 1209 * UDF file entry (FE) (@ecma167{4,14.8,97}, @udf260{ }).1208 * UDF file entry (FE) (@ecma167{4,14.8,97}, @udf260{2.3.6,62}). 1210 1209 * 1211 1210 * @note Total length shall not exceed one logical block. 1212 1211 */ 1213 typedef struct UDFFILE NTRY1212 typedef struct UDFFILEENTRY 1214 1213 { 1215 1214 /** 0x00: The descriptor tag (UDF_TAG_ID_FILE_ENTRY). */ … … 1257 1256 * attributes, then @a cbAllocDescs bytes of allocation descriptors. */ 1258 1257 uint8_t abExtAttribs[RT_FLEXIBLE_ARRAY]; 1259 } UDFFILE NTRY;1260 AssertCompileMemberOffset(UDFFILE NTRY, abExtAttribs, 0xb0);1258 } UDFFILEENTRY; 1259 AssertCompileMemberOffset(UDFFILEENTRY, abExtAttribs, 0xb0); 1261 1260 /** Pointer to an UDF file entry. */ 1262 typedef UDFFILE NTRY *PUDFFILENTRY;1261 typedef UDFFILEENTRY *PUDFFILEENTRY; 1263 1262 /** Pointer to a const UDF file entry. */ 1264 typedef UDFFILE NTRY const *PCUDFFILENTRY;1265 1266 /** @name UDF_PERM_XXX - UDFFILE NTRY::fPermissions1263 typedef UDFFILEENTRY const *PCUDFFILEENTRY; 1264 1265 /** @name UDF_PERM_XXX - UDFFILEENTRY::fPermissions 1267 1266 * See @ecma167{4,14.9.5,99}. 1268 1267 * @{ */ … … 1332 1331 1333 1332 /** 1333 * UDF character set info EA data (@ecma167{4,14.10.3,104}). 1334 * 1335 * Not needed by UDF. 1336 */ 1337 typedef struct UDFEADATACHARSETINFO 1338 { 1339 /** 0x00/0x0c: The length of the escape sequences (in bytes). */ 1340 uint32_t cbEscSeqs; 1341 /** 0x04/0x10: The character set type (UDF_CHAR_SET_TYPE_XXX). */ 1342 uint8_t bType; 1343 /** 0x05/0x11: Escape sequences. */ 1344 uint8_t abEscSeqs[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1345 } UDFEADATACHARSETINFO; 1346 /** Pointer to UDF character set info EA data. */ 1347 typedef UDFEADATACHARSETINFO *PUDFEADATACHARSETINFO; 1348 /** Pointer to const UDF character set info EA data. */ 1349 typedef UDFEADATACHARSETINFO const *PCUDFEADATACHARSETINFO; 1350 /** UDFGEA::uAttribType value for UDFEADATACHARSETINFO.*/ 1351 #define UDFEADATACHARSETINFO_ATTRIB_TYPE UINT32_C(0x00000001) 1352 /** UDFGEA::uAttribSubtype value for UDFEADATACHARSETINFO. */ 1353 #define UDFEADATACHARSETINFO_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1354 1355 /** 1356 * UDF alternate permissions EA data (@ecma167{4,14.10.4,105}, @udf260{3.3.4.2,80}). 1357 * @note Not recorded according to the UDF specification. 1358 */ 1359 typedef struct UDFEADATAALTPERM 1360 { 1361 /** 0x00/0x0c: Alternative owner ID. */ 1362 uint16_t idOwner; 1363 /** 0x02/0x0e: Alternative group ID. */ 1364 uint16_t idGroup; 1365 /** 0x04/0x10: Alternative permissions. */ 1366 uint16_t fPermission; 1367 } UDFEADATAALTPERM; 1368 /** Pointer to UDF alternative permissions EA data. */ 1369 typedef UDFEADATAALTPERM *PUDFEADATAALTPERM; 1370 /** Pointer to const UDF alternative permissions EA data. */ 1371 typedef UDFEADATAALTPERM const *PCUDFEADATAALTPERM; 1372 /** UDFGEA::uAttribType value for UDFEADATAALTPERM. */ 1373 #define UDFEADATAALTPERM_ATTRIB_TYPE UINT32_C(0x00000003) 1374 /** UDFGEA::uAttribSubtype value for UDFEADATAALTPERM. */ 1375 #define UDFEADATAALTPERM_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1376 1377 /** 1378 * UDF file times EA data (@ecma167{4,14.10.5,108}, @udf260{3.3.4.3,80}). 1379 * (This is a bit reminiscent of ISO9660RRIPTF.) 1380 */ 1381 typedef struct UDFEADATAFILETIMES 1382 { 1383 /** 0x00/0x0c: Timestamp length. */ 1384 uint32_t cbTimestamps; 1385 /** 0x04/0x10: Indicates which timestamps are present 1386 * (UDF_FILE_TIMES_EA_F_XXX). */ 1387 uint32_t fFlags; 1388 /** 0x08/0x14: Timestamps. */ 1389 UDFTIMESTAMP aTimestamps[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1390 } UDFEADATAFILETIMES; 1391 /** Pointer to UDF file times EA data. */ 1392 typedef UDFEADATAFILETIMES *PUDFEADATAFILETIMES; 1393 /** Pointer to const UDF file times EA data. */ 1394 typedef UDFEADATAFILETIMES const *PCUDFEADATAFILETIMES; 1395 /** UDFGEA::uAttribType value for UDFEADATAFILETIMES. */ 1396 #define UDFEADATAFILETIMES_ATTRIB_TYPE UINT32_C(0x00000005) 1397 /** UDFGEA::uAttribSubtype value for UDFEADATAFILETIMES. */ 1398 #define UDFEADATAFILETIMES_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1399 1400 /** @name UDF_FILE_TIMES_EA_F_XXX - File times existence flags. 1401 * See @ecma167{4,14.10.5.6,109} 1402 * @{ */ 1403 #define UDF_FILE_TIMES_EA_F_BIRTH UINT8_C(0x01) /**< Birth (creation) timestamp is recorded. */ 1404 #define UDF_FILE_TIMES_EA_F_DELETE UINT8_C(0x04) /**< Deletion timestamp is recorded. */ 1405 #define UDF_FILE_TIMES_EA_F_EFFECTIVE UINT8_C(0x08) /**< Effective timestamp is recorded. */ 1406 #define UDF_FILE_TIMES_EA_F_BACKUP UINT8_C(0x20) /**< Backup timestamp is recorded. */ 1407 #define UDF_FILE_TIMES_EA_F_RESERVED_MASK UINT8_C(0xd2) 1408 /** @} */ 1409 1410 /** 1411 * UDF information times EA data (@ecma167{4,14.10.6,109}). 1412 */ 1413 typedef struct UDFEADATAINFOTIMES 1414 { 1415 /** 0x00/0x0c: Timestamp length. */ 1416 uint32_t cbTimestamps; 1417 /** 0x04/0x10: Indicates which timestamps are present 1418 * (UDF_INFO_TIMES_EA_F_XXX). */ 1419 uint32_t fFlags; 1420 /** 0x08/0x14: Timestamps. */ 1421 UDFTIMESTAMP aTimestamps[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1422 } UDFEADATAINFOTIMES; 1423 /** Pointer to UDF information times EA data. */ 1424 typedef UDFEADATAINFOTIMES *PUDFEADATAINFOTIMES; 1425 /** Pointer to const UDF information times EA data. */ 1426 typedef UDFEADATAINFOTIMES const *PCUDFEADATAINFOTIMES; 1427 /** UDFGEA::uAttribType value for UDFEADATAINFOTIMES. */ 1428 #define UDFEADATAINFOTIMES_ATTRIB_TYPE UINT32_C(0x00000006) 1429 /** UDFGEA::uAttribSubtype value for UDFEADATAINFOTIMES. */ 1430 #define UDFEADATAINFOTIMES_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1431 1432 /** @name UDF_INFO_TIMES_EA_F_XXX - Information times existence flags. 1433 * See @ecma167{4,14.10.6.6,110} 1434 * @{ */ 1435 #define UDF_INFO_TIMES_EA_F_BIRTH UINT8_C(0x01) /**< Birth (creation) timestamp is recorded. */ 1436 #define UDF_INFO_TIMES_EA_F_MODIFIED UINT8_C(0x02) /**< Last (data) modified timestamp is recorded. */ 1437 #define UDF_INFO_TIMES_EA_F_EXPIRE UINT8_C(0x04) /**< Expiration (deletion) timestamp is recorded. */ 1438 #define UDF_INFO_TIMES_EA_F_EFFECTIVE UINT8_C(0x08) /**< Effective timestamp is recorded. */ 1439 #define UDF_INFO_TIMES_EA_F_RESERVED_MASK UINT8_C(0xf0) 1440 /** @} */ 1441 1442 /** 1443 * UDF device specification EA data (@ecma167{4,14.10.7,110}, @udf260{3.3.4.4,81}). 1444 */ 1445 typedef struct UDFEADATADEVICESPEC 1446 { 1447 /** 0x00/0x0c: Length of implementation use field. */ 1448 uint32_t cbImplementationUse; 1449 /** 0x04/0x10: Major device number. */ 1450 uint32_t uMajorDeviceNo; 1451 /** 0x08/0x14: Minor device number. */ 1452 uint32_t uMinorDeviceNo; 1453 /** 0x0c/0x18: Implementation use field (variable length). 1454 * UDF specficiation expects UDFENTITYID with 1455 * UDF_ENTITY_ID_DSEA_IMPLEMENTATION_USE as first part here. */ 1456 uint8_t abImplementationUse[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1457 } UDFEADATADEVICESPEC; 1458 /** Pointer to UDF device specification EA data. */ 1459 typedef UDFEADATADEVICESPEC *PUDFEADATADEVICESPEC; 1460 /** Pointer to const UDF device specification EA data. */ 1461 typedef UDFEADATADEVICESPEC const *PCUDFEADATADEVICESPEC; 1462 /** UDFGEA::uAttribType value for UDFEADATADEVICESPEC. */ 1463 #define UDFEADATADEVICESPEC_ATTRIB_TYPE UINT32_C(0x0000000c) 1464 /** UDFGEA::uAttribSubtype value for UDFEADATADEVICESPEC. */ 1465 #define UDFEADATADEVICESPEC_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1466 1467 /** 1468 * UDF free EA space payload for implementation and application use EAs 1469 * (@udf260{3.3.4.5.1.1,82}, @udf260{3.3.4.6.1.1,88}). 1470 * 1471 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_FREE_EA_SPACE. 1472 * UDFEADATAAPPUSE::idImplementation is UDF_ENTITY_ID_AUEA_FREE_EA_SPACE. 1473 */ 1474 typedef struct UDFFREEEASPACE 1475 { 1476 /** 0x00/0x30: Header checksum. 1477 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1478 uint16_t uChecksum; 1479 /** 0x02/0x32: Free space. */ 1480 uint8_t abFree[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1481 } UDFFREEEASPACE; 1482 /** Pointer to UDF free EA space impl/app use payload. */ 1483 typedef UDFFREEEASPACE *PUDFFREEEASPACE; 1484 /** Pointer to const UDF free EA space impl/app use payload. */ 1485 typedef UDFFREEEASPACE const *PCUDFFREEEASPACE; 1486 1487 /** 1488 * UDF DVD copyright management information implementation use EA payload 1489 * (@udf260{3.3.4.5.1.2,83}). 1490 * 1491 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_DVD_CGMS_INFO. 1492 */ 1493 typedef struct UDFIUEADVDCGMSINFO 1494 { 1495 /** 0x00/0x30: Header checksum. 1496 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1497 uint16_t uChecksum; 1498 /** 0x02/0x32: The CGMS information (whatever that is). */ 1499 uint8_t bInfo; 1500 /** 0x03/0x33: Data structure type (whatever that is). */ 1501 uint8_t bType; 1502 /** 0x04/0x34: Production system information, probably dependend on the 1503 * values of previous fields. */ 1504 uint8_t abProtSysInfo[4]; 1505 } UDFIUEADVDCGMSINFO; 1506 /** Pointer to UDF DVD copyright management information implementation use EA payload. */ 1507 typedef UDFIUEADVDCGMSINFO *PUDFIUEADVDCGMSINFO; 1508 /** Pointer to const UDF DVD copyright management information implementation use EA payload. */ 1509 typedef UDFIUEADVDCGMSINFO const *PCUDFIUEADVDCGMSINFO; 1510 1511 /** 1512 * UDF OS/2 EA length implementation use EA payload (@udf260{3.3.4.5.3.1,84}). 1513 * 1514 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_OS2_EA_LENGTH. 1515 */ 1516 #pragma pack(2) 1517 typedef struct UDFIUEAOS2EALENGTH 1518 { 1519 /** 0x00/0x30: Header checksum. 1520 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1521 uint16_t uChecksum; 1522 /** 0x02/0x32: The CGMS information (whatever that is). */ 1523 uint32_t cbEAs; 1524 } UDFIUEAOS2EALENGTH; 1525 #pragma pack() 1526 AssertCompileMemberOffset(UDFIUEAOS2EALENGTH, cbEAs, 2); 1527 /** Pointer to UDF OS/2 EA length implementation use EA payload. */ 1528 typedef UDFIUEAOS2EALENGTH *PUDFIUEAOS2EALENGTH; 1529 /** Pointer to const UDF OS/2 EA length implementation use EA payload. */ 1530 typedef UDFIUEAOS2EALENGTH const *PCUDFIUEAOS2EALENGTH; 1531 1532 /** 1533 * UDF Mac volume info implementation use EA payload (@udf260{3.3.4.5.4.1,84}). 1534 * 1535 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_MAC_VOLUME_INFO. 1536 */ 1537 #pragma pack(2) 1538 typedef struct UDFIUEAMACVOLINFO 1539 { 1540 /** 0x00/0x30: Header checksum. 1541 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1542 uint16_t uChecksum; 1543 /** 0x02/0x32: Last modification time. */ 1544 UDFTIMESTAMP LastModificationTime; 1545 /** 0x0e/0x3e: Last backup time. */ 1546 UDFTIMESTAMP LastBackupTime; 1547 /** 0x1a/0x4e: Volume finder information. */ 1548 uint32_t au32FinderInfo[8]; 1549 } UDFIUEAMACVOLINFO; 1550 #pragma pack() 1551 AssertCompileMemberOffset(UDFIUEAMACVOLINFO, au32FinderInfo, 0x1a); 1552 /** Pointer to UDF Mac volume info implementation use EA payload. */ 1553 typedef UDFIUEAMACVOLINFO *PUDFIUEAMACVOLINFO; 1554 /** Pointer to const UDF Mac volume info implementation use EA payload. */ 1555 typedef UDFIUEAMACVOLINFO const *PCUDFIUEAMACVOLINFO; 1556 1557 /** 1558 * UDF point for use in Mac EAs (@udf260{3.3.4.5.4.2,86}). 1559 */ 1560 typedef struct UDFMACPOINT 1561 { 1562 /** X coordinate. */ 1563 int16_t x; 1564 /** Y coordinate. */ 1565 int16_t y; 1566 } UDFMACPOINT; 1567 1568 /** 1569 * UDF rectangle for using Mac EAs (@udf260{3.3.4.5.4.2,86}). 1570 */ 1571 typedef struct UDFMACRECT 1572 { 1573 /** top Y coordinate. */ 1574 int16_t yTop; 1575 /** left X coordinate. */ 1576 int16_t xLeft; 1577 /** bottom Y coordinate. (exclusive?) */ 1578 int16_t yBottom; 1579 /** right X coordinate. (exclusive?) */ 1580 int16_t xRight; 1581 } UDFMACRECT; 1582 1583 /** 1584 * UDF finder directory info for Mac EAs (@udf260{3.3.4.5.4.2,86}). 1585 */ 1586 typedef struct UDFMACFDINFO 1587 { 1588 UDFMACRECT FrRect; 1589 int16_t FrFlags; 1590 UDFMACPOINT FrLocation; 1591 int16_t FrView; 1592 } UDFMACFDINFO; 1593 AssertCompileSize(UDFMACFDINFO, 16); 1594 1595 /** 1596 * UDF finder directory extended info for Mac EAs (@udf260{3.3.4.5.4.2,86}). 1597 */ 1598 typedef struct UDFMACFDXINFO 1599 { 1600 UDFMACPOINT FrScroll; 1601 int32_t FrOpenChain; 1602 uint8_t FrScript; 1603 uint8_t FrXFlags; 1604 uint16_t FrComment; 1605 uint32_t FrPutAway; 1606 } UDFMACFDXINFO; 1607 AssertCompileSize(UDFMACFDXINFO, 16); 1608 1609 /** 1610 * UDF Mac finder info implementation use EA payload (@udf260{3.3.4.5.4.1,84}), 1611 * directory edition. 1612 * 1613 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_MAC_FINDER_INFO. 1614 */ 1615 typedef struct UDFIUEAMACFINDERINFODIR 1616 { 1617 /** 0x00/0x30: Header checksum. 1618 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1619 uint16_t uChecksum; 1620 /** 0x02/0x32: Explicit alignment padding, MBZ. */ 1621 uint16_t uPadding; 1622 /** 0x04/0x34: Parent directory ID. */ 1623 uint32_t idParentDir; 1624 /** 0x08/0x38: Dir information. */ 1625 UDFMACFDINFO DirInfo; 1626 /** 0x18/0x48: Dir extended information. */ 1627 UDFMACFDXINFO DirExInfo; 1628 } UDFIUEAMACFINDERINFODIR; 1629 AssertCompileMemberOffset(UDFIUEAMACFINDERINFODIR, DirInfo, 0x08); 1630 AssertCompileMemberOffset(UDFIUEAMACFINDERINFODIR, DirExInfo, 0x18); 1631 AssertCompileSize(UDFIUEAMACFINDERINFODIR, 0x28); 1632 /** Pointer to UDF Mac finder info for dir implementation use EA payload. */ 1633 typedef UDFIUEAMACFINDERINFODIR *PUDFIUEAMACFINDERINFODIR; 1634 /** Pointer to const UDF Mac finder info for dir implementation use EA payload. */ 1635 typedef UDFIUEAMACFINDERINFODIR const *PCUDFIUEAMACFINDERINFODIR; 1636 1637 /** 1638 * UDF finder file info for Mac EAs (@udf260{3.3.4.5.4.2,86}). 1639 */ 1640 typedef struct UDFMACFFINFO 1641 { 1642 uint32_t FrType; 1643 uint32_t FrCreator; 1644 uint16_t FrFlags; 1645 UDFMACPOINT FrLocation; 1646 int16_t FrFldr; 1647 } UDFMACFFINFO; 1648 AssertCompileSize(UDFMACFFINFO, 16); 1649 1650 /** 1651 * UDF finder file extended info for Mac EAs (@udf260{3.3.4.5.4.2,86}). 1652 */ 1653 typedef struct UDFMACFFXINFO 1654 { 1655 int16_t FrIconID; 1656 uint8_t FdUnused[6]; 1657 uint8_t FrScript; 1658 uint8_t FrXFlags; 1659 uint16_t FrComment; 1660 uint32_t FrPutAway; 1661 } UDFMACFFXINFO; 1662 AssertCompileSize(UDFMACFFXINFO, 16); 1663 1664 /** 1665 * UDF Mac finder info implementation use EA payload (@udf260{3.3.4.5.4.1,84}), 1666 * file edition. 1667 * 1668 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_MAC_FINDER_INFO. 1669 */ 1670 typedef struct UDFIUEAMACFINDERINFOFILE 1671 { 1672 /** 0x00/0x30: Header checksum. 1673 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1674 uint16_t uChecksum; 1675 /** 0x02/0x32: Explicit alignment padding, MBZ. */ 1676 uint16_t uPadding; 1677 /** 0x04/0x34: Parent directory ID. */ 1678 uint32_t idParentDir; 1679 /** 0x08/0x38: File information. */ 1680 UDFMACFFINFO FileInfo; 1681 /** 0x18/0x48: File extended information. */ 1682 UDFMACFFXINFO FileExInfo; 1683 /** 0x28/0x58: The size of the fork data (in bytes). */ 1684 uint32_t cbForkData; 1685 /** 0x2c/0x5c: The size of the fork allocation (in bytes). */ 1686 uint32_t cbForkAlloc; 1687 } UDFIUEAMACFINDERINFOFILE; 1688 AssertCompileMemberOffset(UDFIUEAMACFINDERINFOFILE, FileInfo, 0x08); 1689 AssertCompileMemberOffset(UDFIUEAMACFINDERINFOFILE, FileExInfo, 0x18); 1690 AssertCompileMemberOffset(UDFIUEAMACFINDERINFOFILE, cbForkData, 0x28); 1691 AssertCompileSize(UDFIUEAMACFINDERINFOFILE, 0x30); 1692 /** Pointer to UDF Mac finder info for file implementation use EA payload. */ 1693 typedef UDFIUEAMACFINDERINFOFILE *PUDFIUEAMACFINDERINFOFILE; 1694 /** Pointer to const UDF Mac finder info for file implementation use EA payload. */ 1695 typedef UDFIUEAMACFINDERINFOFILE const *PCUDFIUEAMACFINDERINFOFILE; 1696 1697 /** 1698 * UDF OS/400 directory info implementation use EA payload (@udf260{3.3.4.5.6.1,87}) 1699 * 1700 * UDFEADATAIMPLUSE::idImplementation is UDF_ENTITY_ID_IUEA_OS400_DIR_INFO. 1701 */ 1702 typedef struct UDFIUEAOS400DIRINFO 1703 { 1704 /** 0x00/0x30: Header checksum. 1705 * @note 16-bit checksum of UDFGEA up thru u.ImplUse.idImplementation. */ 1706 uint16_t uChecksum; 1707 /** 0x02/0x32: Explicit alignment padding, MBZ. */ 1708 uint16_t uPadding; 1709 /** 0x04/0x34: The directory info, format documented elsewhere. */ 1710 uint8_t abDirInfo[44]; 1711 } UDFIUEAOS400DIRINFO; 1712 AssertCompileSize(UDFIUEAOS400DIRINFO, 0x30); 1713 /** Pointer to UDF Mac finder info for file implementation use EA payload. */ 1714 typedef UDFIUEAOS400DIRINFO *PUDFIUEAOS400DIRINFO; 1715 /** Pointer to const UDF Mac finder info for file implementation use EA payload. */ 1716 typedef UDFIUEAOS400DIRINFO const *PCUDFIUEAOS400DIRINFO; 1717 1718 1719 /** 1720 * UDF implementation use EA data (@ecma167{4,14.10.8,111}, @udf260{3.3.4.5,82}). 1721 */ 1722 typedef struct UDFEADATAIMPLUSE 1723 { 1724 /** 0x00/0x0c: Length uData in bytes. */ 1725 uint32_t cbData; 1726 /** 0x04/0x10: Implementation identifier (UDF_ENTITY_ID_IUEA_XXX). */ 1727 UDFENTITYID idImplementation; 1728 /** 0x24/0x30: Implementation use field (variable length). */ 1729 union 1730 { 1731 /** Generic byte view. */ 1732 uint8_t abData[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1733 /** Free EA space (UDF_ENTITY_ID_IUEA_FREE_EA_SPACE). */ 1734 UDFFREEEASPACE FreeEaSpace; 1735 /** DVD copyright management information (UDF_ENTITY_ID_IUEA_DVD_CGMS_INFO). */ 1736 UDFIUEADVDCGMSINFO DvdCgmsInfo; 1737 /** OS/2 EA length (UDF_ENTITY_ID_IUEA_OS2_EA_LENGTH). */ 1738 UDFIUEAOS2EALENGTH Os2EaLength; 1739 /** Mac volume info (UDF_ENTITY_ID_IUEA_MAC_VOLUME_INFO). */ 1740 UDFIUEAMACVOLINFO MacVolInfo; 1741 /** Mac finder info, directory edition (UDF_ENTITY_ID_IUEA_MAC_FINDER_INFO). */ 1742 UDFIUEAMACFINDERINFODIR MacFinderInfoDir; 1743 /** Mac finder info, file edition (UDF_ENTITY_ID_IUEA_MAC_FINDER_INFO). */ 1744 UDFIUEAMACFINDERINFOFILE MacFinderInfoFile; 1745 /** OS/400 directory info (UDF_ENTITY_ID_IUEA_OS400_DIR_INFO). */ 1746 UDFIUEAOS400DIRINFO Os400DirInfo; 1747 } u; 1748 } UDFEADATAIMPLUSE; 1749 /** Pointer to UDF implementation use EA data. */ 1750 typedef UDFEADATAIMPLUSE *PUDFEADATAIMPLUSE; 1751 /** Pointer to const UDF implementation use EA data. */ 1752 typedef UDFEADATAIMPLUSE const *PCUDFEADATAIMPLUSE; 1753 /** UDFGEA::uAttribType value for UDFEADATAIMPLUSE. */ 1754 #define UDFEADATAIMPLUSE_ATTRIB_TYPE UINT32_C(0x00000800) 1755 /** UDFGEA::uAttribSubtype value for UDFEADATAIMPLUSE. */ 1756 #define UDFEADATAIMPLUSE_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1757 1758 /** 1759 * UDF application use EA data (@ecma167{4,14.10.9,112}, @udf260{3.3.4.6,88}). 1760 */ 1761 typedef struct UDFEADATAAPPUSE 1762 { 1763 /** 0x0c: Length uData in bytes. */ 1764 uint32_t cbData; 1765 /** 0x10: Application identifier (UDF_ENTITY_ID_AUEA_FREE_EA_SPACE). */ 1766 UDFENTITYID idApplication; 1767 /** 0x30: Application use field (variable length). */ 1768 union 1769 { 1770 /** Generic byte view. */ 1771 uint8_t ab[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1772 /** Free EA space (UDF_ENTITY_ID_AUEA_FREE_EA_SPACE). */ 1773 UDFFREEEASPACE FreeEaSpace; 1774 } uData; 1775 } UDFEADATAAPPUSE; 1776 /** Pointer to UDF application use EA data. */ 1777 typedef UDFEADATAAPPUSE *PUDFEADATAAPPUSE; 1778 /** Pointer to const UDF application use EA data. */ 1779 typedef UDFEADATAAPPUSE const *PCUDFEADATAAPPUSE; 1780 /** UDFGEA::uAttribType value for UDFEADATAAPPUSE. */ 1781 #define UDFEADATAAPPUSE_ATTRIB_TYPE UINT32_C(0x00010000) 1782 /** UDFGEA::uAttribSubtype value for UDFEADATAAPPUSE. */ 1783 #define UDFEADATAAPPUSE_ATTRIB_SUBTYPE UINT32_C(0x00000001) 1784 1785 /** 1334 1786 * UDF generic extended attribute (@ecma167{4,14.10.2,103}). 1335 1787 */ 1336 1788 typedef struct UDFGEA 1337 1789 { 1338 /** 0x00: Attribute type . */1790 /** 0x00: Attribute type (UDFXXX_ATTRIB_TYPE). */ 1339 1791 uint32_t uAttribType; 1340 /** 0x04: Attribute subtype . */1792 /** 0x04: Attribute subtype (UDFXXX_ATTRIB_SUBTYPE). */ 1341 1793 uint8_t uAttribSubtype; 1342 1794 /** 0x05: Reserved padding bytes, MBZ. */ … … 1349 1801 { 1350 1802 /** Generic byte view (variable size). */ 1351 uint8_t abData[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1352 1803 uint8_t abData[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1804 /** Character set information (@ecma167{4,14.10.3,104}). */ 1805 UDFEADATACHARSETINFO CharSetInfo; 1353 1806 /** Alternate permissions (@ecma167{4,14.10.4,105}, @udf260{3.3.4.2,80}). 1354 1807 * @note Not recorded according to the UDF specification. */ 1355 struct 1356 { 1357 /** 0x0c: Alternative owner ID. */ 1358 uint16_t idOwner; 1359 /** 0x0e: Alternative group ID. */ 1360 uint16_t idGroup; 1361 /** 0x10: Alternative permissions. */ 1362 uint16_t fPermission; 1363 } AltPerm; 1364 1808 UDFEADATAALTPERM AltPerm; 1365 1809 /** File times (@ecma167{4,14.10.5,108}, @udf260{3.3.4.3,80}). 1366 1810 * (This is a bit reminiscent of ISO9660RRIPTF.) */ 1367 struct 1368 { 1369 /** 0x0c: Timestamp length. */ 1370 uint32_t cbTimestamps; 1371 /** 0x10: Indicates which timestamps are present (UDF_FILE_TIMES_EA_F_XXX). */ 1372 uint32_t fFlags; 1373 /** 0x14: Timestamps. */ 1374 UDFTIMESTAMP aTimestamps[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1375 } FileTimes; 1376 1811 UDFEADATAFILETIMES FileTimes; 1377 1812 /** Information times (@ecma167{4,14.10.6,109}). */ 1378 struct 1379 { 1380 /** 0x0c: Timestamp length. */ 1381 uint32_t cbTimestamps; 1382 /** 0x10: Indicates which timestamps are present (UDF_INFO_TIMES_EA_F_XXX). */ 1383 uint32_t fFlags; 1384 /** 0x14: Timestamps. */ 1385 UDFTIMESTAMP aTimestamps[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1386 } InfoTimes; 1387 1813 UDFEADATAINFOTIMES InfoTimes; 1388 1814 /** Device specification (@ecma167{4,14.10.7,110}, @udf260{3.3.4.4,81}). */ 1389 struct 1390 { 1391 /** 0x0c: Length of implementation use field. */ 1392 uint32_t cbImplementationUse; 1393 /** 0x10: Major device number. */ 1394 uint32_t uMajorDeviceNo; 1395 /** 0x14: Minor device number. */ 1396 uint32_t uMinorDeviceNo; 1397 /** 0x18: Implementation use field (variable length). 1398 * UDF specficiation expects UDFENTITYID with 1399 * UDF_ENTITY_ID_DSEA_IMPLEMENTATION_USE as first part here. */ 1400 uint8_t abImplementationUse[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1401 } DeviceSpec; 1402 1815 UDFEADATADEVICESPEC DeviceSpec; 1403 1816 /** Implementation use (@ecma167{4,14.10.8,111}, @udf260{3.3.4.5,82}). */ 1404 struct 1405 { 1406 /** 0x0c: Length uData in bytes. */ 1407 uint32_t cbData; 1408 /** 0x10: Implementation identifier (UDF_ENTITY_ID_IUEA_XXX). */ 1409 UDFENTITYID idImplementation; 1410 /** 0x30: Implementation use field (variable length). */ 1411 union 1412 { 1413 /** Generic byte view. */ 1414 uint8_t ab[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1415 /** @todo Lots more here later. */ 1416 } uData; 1417 } ImplUse; 1418 1817 UDFEADATAIMPLUSE ImplUse; 1419 1818 /** Application use (@ecma167{4,14.10.9,112}, @udf260{3.3.4.6,88}). */ 1420 struct 1421 { 1422 /** 0x0c: Length uData in bytes. */ 1423 uint32_t cbData; 1424 /** 0x10: Application identifier (UDF_ENTITY_ID_AUEA_FREE_EA_SPACE). */ 1425 UDFENTITYID idApplication; 1426 /** 0x30: Application use field (variable length). */ 1427 union 1428 { 1429 /** Generic byte view. */ 1430 uint8_t ab[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1431 /** @todo One more here later. */ 1432 } uData; 1433 } AppUse; 1434 1819 UDFEADATAAPPUSE AppUse; 1435 1820 } u; 1436 1821 } UDFGEA; 1437 1438 1439 /** @name UDF_FILE_TIMES_EA_F_XXX - File times existence flags. 1440 * See @ecma167{4,14.10.5.6,109} 1441 * @{ */ 1442 #define UDF_FILE_TIMES_EA_F_BIRTH UINT8_C(0x01) /**< Birth (creation) timestamp is recorded. */ 1443 #define UDF_FILE_TIMES_EA_F_DELETE UINT8_C(0x04) /**< Deletion timestamp is recorded. */ 1444 #define UDF_FILE_TIMES_EA_F_EFFECTIVE UINT8_C(0x08) /**< Effective timestamp is recorded. */ 1445 #define UDF_FILE_TIMES_EA_F_BACKUP UINT8_C(0x20) /**< Backup timestamp is recorded. */ 1446 #define UDF_FILE_TIMES_EA_F_RESERVED_MASK UINT8_C(0xd2) 1447 /** @} */ 1448 1449 /** @name UDF_INFO_TIMES_EA_F_XXX - Information times existence flags. 1450 * See @ecma167{4,14.10.6.6,110} 1451 * @{ */ 1452 #define UDF_INFO_TIMES_EA_F_BIRTH UINT8_C(0x01) /**< Birth (creation) timestamp is recorded. */ 1453 #define UDF_INFO_TIMES_EA_F_MODIFIED UINT8_C(0x02) /**< Last (data) modified timestamp is recorded. */ 1454 #define UDF_INFO_TIMES_EA_F_EXPIRE UINT8_C(0x04) /**< Expiration (deletion) timestamp is recorded. */ 1455 #define UDF_INFO_TIMES_EA_F_EFFECTIVE UINT8_C(0x08) /**< Effective timestamp is recorded. */ 1456 #define UDF_INFO_TIMES_EA_F_RESERVED_MASK UINT8_C(0xf0) 1457 /** @} */ 1458 1459 1460 //#define UDF_TAG_ID_UNALLOCATED_SPACE_ENTRY UINT16_C(0x0107) 1461 //#define UDF_TAG_ID_SPACE_BITMAP_DESC UINT16_C(0x0108) 1462 //#define UDF_TAG_ID_PARTITION_INTEGERITY_DESC UINT16_C(0x0109) 1463 //#define UDF_TAG_ID_EXTENDED_FILE_ENTRY UINT16_C(0x010a) 1822 AssertCompileMemberOffset(UDFGEA, u, 0x0c); 1823 /** Pointer to a UDF extended attribute. */ 1824 typedef UDFGEA *PUDFGEA; 1825 /** Pointer to a const UDF extended attribute. */ 1826 typedef UDFGEA const *PCUDFGEA; 1827 1828 1829 /** 1830 * UDF unallocated space entry (@ecma167{4,14.11,113}, @udf260{2.3.7,64}). 1831 * 1832 * @note Total length shall not exceed one logical block. 1833 */ 1834 typedef struct UDFUNALLOCATEDSPACEENTRY 1835 { 1836 /** 0x00: The descriptor tag (UDF_TAG_ID_UNALLOCATED_SPACE_ENTRY). */ 1837 UDFTAG Tag; 1838 /** 0x10: ICB Tag. */ 1839 UDFICBTAG IcbTag; 1840 /** 0x24: Size of the allocation desciptors in bytes. */ 1841 uint32_t cbAllocDescs; 1842 /** 0x28: Allocation desciptors, type given by IcbTag::fFlags. */ 1843 union 1844 { 1845 UDFSHORTAD aShortADs[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1846 UDFLONGAD aLongADs[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1847 UDFEXTAD aExtADs[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION]; 1848 UDFEXTENTAD SingleAD; 1849 } u; 1850 } UDFUNALLOCATEDSPACEENTRY; 1851 AssertCompileMemberOffset(UDFUNALLOCATEDSPACEENTRY, u, 0x28); 1852 /** Pointer to an UDF unallocated space entry. */ 1853 typedef UDFUNALLOCATEDSPACEENTRY *PUDFUNALLOCATEDSPACEENTRY; 1854 /** Pointer to a const UDF unallocated space entry. */ 1855 typedef UDFUNALLOCATEDSPACEENTRY const *PCUDFUNALLOCATEDSPACEENTRY; 1856 1857 1858 /** 1859 * UDF space bitmap descriptor (SBD) (@ecma167{4,14.12,114}, @udf260{2.3.8,65}). 1860 */ 1861 typedef struct UDFSPACEBITMAPDESC 1862 { 1863 /** 0x00: The descriptor tag (UDF_TAG_ID_SPACE_BITMAP_DESC). */ 1864 UDFTAG Tag; 1865 /** 0x10: Number of bits in the bitmap. */ 1866 uint32_t cBits; 1867 /** 0x14: The bitmap size in bytes. */ 1868 uint32_t cbBitmap; 1869 /** 0x18: The bitmap. */ 1870 uint8_t abBitmap[RT_FLEXIBLE_ARRAY]; 1871 } UDFSPACEBITMAPDESC; 1872 AssertCompileMemberOffset(UDFSPACEBITMAPDESC, abBitmap, 0x18); 1873 /** Pointer to an UDF space bitmap descriptor. */ 1874 typedef UDFSPACEBITMAPDESC *PUDFSPACEBITMAPDESC; 1875 /** Pointer to a const UDF space bitmap descriptor. */ 1876 typedef UDFSPACEBITMAPDESC const *PCUDFSPACEBITMAPDESC; 1877 1878 1879 /** 1880 * UDF partition integrity descriptor (@ecma167{4,14.3,115}, @udf260{2.3.9,65}). 1881 * 1882 * @note Not needed by UDF. 1883 */ 1884 typedef struct UDFPARTITIONINTEGRITYDESC 1885 { 1886 /** 0x000: The descriptor tag (UDF_TAG_ID_PARTITION_INTEGERITY_DESC). */ 1887 UDFTAG Tag; 1888 /** 0x010: ICB Tag. */ 1889 UDFICBTAG IcbTag; 1890 /** 0x024: Recording timestamp. */ 1891 UDFTIMESTAMP RecordingTimestamp; 1892 /** 0x030: Interity type (UDF_PARTITION_INTEGRITY_TYPE_XXX). */ 1893 uint8_t bType; 1894 /** 0x031: Reserved. */ 1895 uint8_t abReserved[175]; 1896 /** 0x0e0: Implementation identifier. */ 1897 UDFENTITYID idImplementation; 1898 /** 0x100: Implementation use data. */ 1899 uint8_t abImplementationUse[RT_FLEXIBLE_ARRAY]; 1900 } UDFPARTITIONINTEGRITYDESC; 1901 AssertCompileMemberOffset(UDFPARTITIONINTEGRITYDESC, abImplementationUse, 0x100); 1902 /** Pointer to an UDF partition integrity descriptor. */ 1903 typedef UDFPARTITIONINTEGRITYDESC *PUDFPARTITIONINTEGRITYDESC; 1904 /** Pointer to a const UDF partition integrity descriptor. */ 1905 typedef UDFPARTITIONINTEGRITYDESC const *PCUDFPARTITIONINTEGRITYDESC; 1906 1907 1908 /** 1909 * UDF extended file entry (EFE) (@ecma167{4,14.17,120}, @udf260{3.3.5,83}). 1910 * 1911 * @note Total length shall not exceed one logical block. 1912 */ 1913 typedef struct UDFEXFILEENTRY 1914 { 1915 /** 0x00: The descriptor tag (UDF_TAG_ID_EXTENDED_FILE_ENTRY). */ 1916 UDFTAG Tag; 1917 /** 0x10: ICB Tag. */ 1918 UDFICBTAG IcbTag; 1919 /** 0x24: User ID (UNIX). */ 1920 uint32_t uid; 1921 /** 0x28: Group ID (UNIX). */ 1922 uint32_t gid; 1923 /** 0x2c: Permission (UDF_PERM_XXX). */ 1924 uint32_t fPermissions; 1925 /** 0x30: Number hard links. */ 1926 uint16_t cHardlinks; 1927 /** 0x32: Record format (UDF_REC_FMT_XXX). */ 1928 uint8_t uRecordFormat; 1929 /** 0x33: Record format (UDF_REC_FMT_XXX). */ 1930 uint8_t fRecordDisplayAttribs; 1931 /** 0x34: Record length (in bytes). 1932 * @note Must be zero according to the UDF specification. */ 1933 uint32_t cbRecord; 1934 /** 0x38: Information length in bytes (file size). */ 1935 uint64_t cbData; 1936 /** 0x40: The size of all streams. Same as cbData if no additional streams. */ 1937 uint64_t cbObject; 1938 /** 0x48: Number of logical blocks allocated (for file data). */ 1939 uint64_t cLogicalBlocks; 1940 /** 0x50: Time of last access (prior to recording the file entry). */ 1941 UDFTIMESTAMP AccessTime; 1942 /** 0x5c: Time of last data modification. */ 1943 UDFTIMESTAMP ModificationTime; 1944 /** 0x68: Birth (creation) time. */ 1945 UDFTIMESTAMP BirthTime; 1946 /** 0x74: Time of last attribute/status modification. */ 1947 UDFTIMESTAMP ChangeTime; 1948 /** 0x80: Checkpoint number (defaults to 1). */ 1949 uint32_t uCheckpoint; 1950 /** 0x84: Reserved, MBZ. */ 1951 uint32_t uReserved; 1952 /** 0x88: Extended attribute information control block location. */ 1953 UDFLONGAD ExtAttribIcb; 1954 /** 0x98: Stream directory information control block location. */ 1955 UDFLONGAD StreamDirIcb; 1956 /** 0xa8: Implementation identifier (UDF_ENTITY_ID_FE_IMPLEMENTATION). */ 1957 UDFENTITYID idImplementation; 1958 /** 0xc8: Unique ID. */ 1959 uint64_t INodeId; 1960 /** 0xd0: Length of extended attributes in bytes, multiple of four. */ 1961 uint32_t cbExtAttribs; 1962 /** 0xd4: Length of allocation descriptors in bytes, multiple of four. */ 1963 uint32_t cbAllocDescs; 1964 /** 0xd8: Two variable sized fields. First @a cbExtAttribs bytes of extended 1965 * attributes, then @a cbAllocDescs bytes of allocation descriptors. */ 1966 uint8_t abExtAttribs[RT_FLEXIBLE_ARRAY]; 1967 } UDFEXFILEENTRY; 1968 AssertCompileMemberOffset(UDFEXFILEENTRY, abExtAttribs, 0xd8); 1969 /** Pointer to an UDF extended file entry. */ 1970 typedef UDFEXFILEENTRY *PUDFEXFILEENTRY; 1971 /** Pointer to a const UDF extended file entry. */ 1972 typedef UDFEXFILEENTRY const *PCUDFEXFILEENTRY; 1464 1973 1465 1974
Note:
See TracChangeset
for help on using the changeset viewer.