VirtualBox

Changeset 68399 in vbox


Ignore:
Timestamp:
Aug 11, 2017 6:09:08 PM (7 years ago)
Author:
vboxsync
Message:

iprt/formats/udf.h: More UDF structures.

Location:
trunk/include/iprt/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/iso9660.h

    r68161 r68399  
    255255typedef struct ISO9660EXATTRREC
    256256{
    257     /** 0x000: The owener ID. */
     257    /** 0x000: The owner ID. */
    258258    ISO9660U16          idOwner;
    259     /** 0x004: The owener ID. */
     259    /** 0x004: The group ID. */
    260260    ISO9660U16          idGroup;
    261261    /** 0x008: File permissions (ISO9660_PERM_XXX). */
     
    299299/** @name ISO9660_PERM_XXX - ISO9660EXATTRREC::fPermissions
    300300 * @{ */
    301 /** @todo figure out this wird permission stuff...   */
     301/** @todo figure out this weird permission stuff...   */
    302302/** @} */
    303303
  • trunk/include/iprt/formats/udf.h

    r68398 r68399  
    10381038    uint32_t        offPrevExtent;
    10391039    /** 0x14: Size of the following allocation descriptors (in bytes). */
    1040     uint32_t        cbAllocationDescriptors;
     1040    uint32_t        cbAllocDescs;
    10411041    /** 0x18: Allocation descriptors.
    10421042     * @todo verify format...  */
     
    11881188typedef UDFINDIRECTENTRY const *PCUDFINDIRECTENTRY;
    11891189
    1190 //#define UDF_TAG_ID_TERMINAL_ENTRY                   UINT16_C(0x0104)
    1191 //#define UDF_TAG_ID_FILE_ENTRY                       UINT16_C(0x0105)
    1192 //#define UDF_TAG_ID_EXTENDED_ATTRIB_HDR_DESC         UINT16_C(0x0106)
     1190
     1191/**
     1192 * UDF terminal entry (@ecma167{4,14.8,97}).
     1193 */
     1194typedef struct UDFTERMINALENTRY
     1195{
     1196    /** 0x00: The descriptor tag (UDF_TAG_ID_TERMINAL_ENTRY). */
     1197    UDFTAG          Tag;
     1198    /** 0x10: ICB Tag (UDF_FILE_TYPE_TERMINAL_ENTRY). */
     1199    UDFICBTAG       IcbTag;
     1200} UDFTERMINALENTRY;
     1201AssertCompileSize(UDFTERMINALENTRY, 36);
     1202/** Pointer to an UDF terminal entry. */
     1203typedef UDFTERMINALENTRY *PUDFTERMINALENTRY;
     1204/** Pointer to a const UDF terminal entry. */
     1205typedef UDFTERMINALENTRY const *PCUDFTERMINALENTRY;
     1206
     1207
     1208/**
     1209 * UDF file entry (FE) (@ecma167{4,14.8,97}, @udf260{}).
     1210 *
     1211 * @note Total length shall not exceed one logical block.
     1212 */
     1213typedef struct UDFFILENTRY
     1214{
     1215    /** 0x00: The descriptor tag (UDF_TAG_ID_FILE_ENTRY). */
     1216    UDFTAG          Tag;
     1217    /** 0x10: ICB Tag. */
     1218    UDFICBTAG       IcbTag;
     1219    /** 0x24: User ID (UNIX). */
     1220    uint32_t        uid;
     1221    /** 0x28: Group ID (UNIX). */
     1222    uint32_t        gid;
     1223    /** 0x2c: Permission (UDF_PERM_XXX). */
     1224    uint32_t        fPermissions;
     1225    /** 0x30: Number hard links. */
     1226    uint16_t        cHardlinks;
     1227    /** 0x32: Record format (UDF_REC_FMT_XXX).   */
     1228    uint8_t         uRecordFormat;
     1229    /** 0x33: Record format (UDF_REC_FMT_XXX).   */
     1230    uint8_t         fRecordDisplayAttribs;
     1231    /** 0x34: Record length (in bytes).
     1232     * @note  Must be zero according to the UDF specification. */
     1233    uint32_t        cbRecord;
     1234    /** 0x38: Information length in bytes (file size). */
     1235    uint64_t        cbData;
     1236    /** 0x40: Number of logical blocks allocated (for file data). */
     1237    uint64_t        cLogicalBlocks;
     1238    /** 0x48: Time of last access (prior to recording the file entry). */
     1239    UDFTIMESTAMP    AccessTime;
     1240    /** 0x54: Time of last data modification. */
     1241    UDFTIMESTAMP    ModificationTime;
     1242    /** 0x60: Time of last attribute/status modification. */
     1243    UDFTIMESTAMP    ChangeTime;
     1244    /** 0x6c: Checkpoint number (defaults to 1). */
     1245    uint32_t        uCheckpoint;
     1246    /** 0x70: Extended attribute information control block location. */
     1247    UDFLONGAD       ExtAttribIcb;
     1248    /** 0x80: Implementation identifier (UDF_ENTITY_ID_FE_IMPLEMENTATION). */
     1249    UDFENTITYID     idImplementation;
     1250    /** 0xa0: Unique ID. */
     1251    uint64_t        INodeId;
     1252    /** 0xa8: Length of extended attributes in bytes, multiple of four. */
     1253    uint32_t        cbExtAttribs;
     1254    /** 0xac: Length of allocation descriptors in bytes, multiple of four. */
     1255    uint32_t        cbAllocDescs;
     1256    /** 0xb0: Two variable sized fields.  First @a cbExtAttribs bytes of extended
     1257     *  attributes, then @a cbAllocDescs bytes of allocation descriptors. */
     1258    uint8_t         abExtAttribs[RT_FLEXIBLE_ARRAY];
     1259} UDFFILENTRY;
     1260AssertCompileMemberOffset(UDFFILENTRY, abExtAttribs, 0xb0);
     1261/** Pointer to an UDF file entry. */
     1262typedef UDFFILENTRY *PUDFFILENTRY;
     1263/** Pointer to a const UDF file entry. */
     1264typedef UDFFILENTRY const *PCUDFFILENTRY;
     1265
     1266/** @name UDF_PERM_XXX - UDFFILENTRY::fPermissions
     1267 * See @ecma167{4,14.9.5,99}.
     1268 * @{ */
     1269#define UDF_PERM_OTH_EXEC          UINT32_C(0x00000001)
     1270#define UDF_PERM_OTH_WRITE         UINT32_C(0x00000002)
     1271#define UDF_PERM_OTH_READ          UINT32_C(0x00000004)
     1272#define UDF_PERM_OTH_ATTRIB        UINT32_C(0x00000008)
     1273#define UDF_PERM_OTH_DELETE        UINT32_C(0x00000010)
     1274#define UDF_PERM_OTH_MASK          UINT32_C(0x0000001f)
     1275
     1276#define UDF_PERM_GRP_EXEC          UINT32_C(0x00000020)
     1277#define UDF_PERM_GRP_WRITE         UINT32_C(0x00000040)
     1278#define UDF_PERM_GRP_READ          UINT32_C(0x00000080)
     1279#define UDF_PERM_GRP_ATTRIB        UINT32_C(0x00000100)
     1280#define UDF_PERM_GRP_DELETE        UINT32_C(0x00000200)
     1281#define UDF_PERM_GRP_MASK          UINT32_C(0x000003e0)
     1282
     1283#define UDF_PERM_USR_EXEC          UINT32_C(0x00000400)
     1284#define UDF_PERM_USR_WRITE         UINT32_C(0x00000800)
     1285#define UDF_PERM_USR_READ          UINT32_C(0x00001000)
     1286#define UDF_PERM_USR_ATTRIB        UINT32_C(0x00002000)
     1287#define UDF_PERM_USR_DELETE        UINT32_C(0x00004000)
     1288#define UDF_PERM_USR_MASK          UINT32_C(0x00007c00)
     1289
     1290#define UDF_PERM_USR_RESERVED_MASK UINT32_C(0xffff8000)
     1291/** @} */
     1292
     1293/** @namd UDF_REC_FMT_XXX - Record format.
     1294 * See @ecma167{4,14.9.7,100}.
     1295 * @{ */
     1296/** Not record format specified.
     1297 * @note The only allowed value according to the UDF specification. */
     1298#define UDF_REC_FMT_NOT_SPECIFIED       UINT8_C(0x00)
     1299/** @} */
     1300
     1301/** @namd UDF_REC_ATTR_XXX - Record display attributes.
     1302 * See @ecma167{4,14.9.8,100}.
     1303 * @{ */
     1304/** Manner of record display not specified.
     1305 * @note The only allowed value according to the UDF specification. */
     1306#define UDF_REC_ATTR_NOT_SPECIFIED      UINT8_C(0x00)
     1307/** @} */
     1308
     1309
     1310/**
     1311 * UDF extended attribute header descriptor (@ecma167{4,14.10.1,102},
     1312 * @udf260{3.3.4,79}).
     1313 */
     1314typedef struct UDFEXTATTRIBHDRDESC
     1315{
     1316    /** 0x00: The descriptor tag (UDF_TAG_ID_EXTENDED_ATTRIB_HDR_DESC). */
     1317    UDFTAG          Tag;
     1318    /** 0x10: Implementation attributes location (byte offset) into the EA space.
     1319     * This typically set to UINT32_MAX if not present, though any value larger
     1320     * than the EA space will do. */
     1321    uint32_t        offImplementationAttribs;
     1322    /** 0x14: Application attributes location (byte offset) into the EA space.
     1323     * This typically set to UINT32_MAX if not present, though any value larger
     1324     * than the EA space will do. */
     1325    uint32_t        offApplicationAttribs;
     1326} UDFEXTATTRIBHDRDESC;
     1327AssertCompileSize(UDFEXTATTRIBHDRDESC, 24);
     1328/** Pointer to an UDF extended attribute header descriptor.  */
     1329typedef UDFEXTATTRIBHDRDESC *PUDFEXTATTRIBHDRDESC;
     1330/** Pointer to a const UDF extended attribute header descriptor.  */
     1331typedef UDFEXTATTRIBHDRDESC const *PCUDFEXTATTRIBHDRDESC;
     1332
     1333/**
     1334 * UDF generic extended attribute (@ecma167{4,14.10.2,103}).
     1335 */
     1336typedef struct UDFGEA
     1337{
     1338    /** 0x00: Attribute type. */
     1339    uint32_t        uAttribType;
     1340    /** 0x04: Attribute subtype. */
     1341    uint8_t         uAttribSubtype;
     1342    /** 0x05: Reserved padding bytes, MBZ. */
     1343    uint8_t         abReserved[3];
     1344    /** 0x08: Size of the whole extended attribute.
     1345     * Multiple of four is recommended. */
     1346    uint32_t        cbAttrib;
     1347    /** 0x0c: Attribute data union. */
     1348    union
     1349    {
     1350        /** Generic byte view (variable size). */
     1351        uint8_t         abData[RT_FLEXIBLE_ARRAY_IN_NESTED_UNION];
     1352
     1353        /** Alternate permissions (@ecma167{4,14.10.4,105}, @udf260{3.3.4.2,80}).
     1354         * @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
     1365        /** File times (@ecma167{4,14.10.5,108}, @udf260{3.3.4.3,80}).
     1366         * (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
     1377        /** 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
     1388        /** 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
     1403        /** 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
     1419        /** 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
     1435    } u;
     1436} 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
    11931460//#define UDF_TAG_ID_UNALLOCATED_SPACE_ENTRY          UINT16_C(0x0107)
    11941461//#define UDF_TAG_ID_SPACE_BITMAP_DESC                UINT16_C(0x0108)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette