00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00052 #ifndef _ECMA_167_H
00053 #define _ECMA_167_H 1
00054
00055 #include <cdio/types.h>
00056
00061 typedef enum {
00062 VSD_STD_ID_SIZE = 5,
00064 UDF_REGID_ID_SIZE = 23,
00065 UDF_VOLID_SIZE = 32,
00066 UDF_FID_SIZE = 38,
00067 UDF_VOLSET_ID_SIZE = 128
00068 } ecma_167_enum1_t ;
00069
00072 typedef enum {
00073 TAGID_PRI_VOL = 0x0001,
00074 TAGID_ANCHOR = 0x0002,
00075 TAGID_VOL = 0x0003,
00076 TAGID_IMP_VOL = 0x0004,
00077 TAGID_PARTITION = 0x0005,
00078 TAGID_LOGVOL = 0x0006,
00079 TAGID_UNALLOC_SPACE = 0x0007,
00080 TAGID_TERM = 0x0008,
00081 TAGID_LOGVOL_INTEGRITY = 0x0009,
00082 TAGID_FSD = 0x0100,
00083 TAGID_FID = 0x0101,
00084 TAGID_AED = 0x0102,
00085 TAGID_IE = 0x0103,
00086 TAGID_TE = 0x0104,
00087 TAGID_FILE_ENTRY = 0x0105,
00088 TAGID_EAHD = 0x0106,
00089 TAGID_USE = 0x0107,
00090 TAGID_SBD = 0x0108,
00091 TAGID_PIE = 0x0109,
00092 TAGID_EFE = 0x010A,
00093 } tag_id_t ;
00094
00096 typedef enum {
00097 CHARSPEC_TYPE_CS0 = 0x00,
00098 CHARSPEC_TYPE_CS1 = 0x01,
00099 CHARSPEC_TYPE_CS2 = 0x02,
00100 CHARSPEC_TYPE_CS3 = 0x03,
00101 CHARSPEC_TYPE_CS4 = 0x04,
00102 CHARSPEC_TYPE_CS5 = 0x05,
00103 CHARSPEC_TYPE_CS6 = 0x06,
00104 CHARSPEC_TYPE_CS7 = 0x07,
00106 CHARSPEC_TYPE_CS8 = 0x08,
00107 } udf_charspec_enum_t;
00108
00109 typedef uint8_t udf_Uint8_t;
00110 typedef uint16_t udf_Uint16_t;
00111 typedef uint32_t udf_Uint32_t;
00112 typedef uint64_t udf_Uint64_t;
00113 typedef char udf_dstring;
00115 #define UDF_LENGTH_MASK 0x3fffffff
00116
00117 PRAGMA_BEGIN_PACKED
00118
00120 struct udf_charspec_s
00121 {
00122 udf_Uint8_t charset_type;
00123 udf_Uint8_t charset_info[63];
00124 } GNUC_PACKED;
00125
00126 typedef struct udf_charspec_s udf_charspec_t;
00127
00129 struct udf_timestamp_s
00130 {
00131 udf_Uint16_t type_tz;
00132 udf_Uint16_t year;
00133 udf_Uint8_t month;
00134 udf_Uint8_t day;
00135 udf_Uint8_t hour;
00136 udf_Uint8_t minute;
00137 udf_Uint8_t second;
00138 udf_Uint8_t centiseconds;
00139 udf_Uint8_t hundreds_of_microseconds;
00140 udf_Uint8_t microseconds;
00141 } GNUC_PACKED;
00142
00143 typedef struct udf_timestamp_s udf_timestamp_t;
00144
00150 typedef enum {
00151 TIMESTAMP_TYPE_CUT = 0x0000,
00152 TIMESTAMP_TYPE_LOCAL = 0x1000,
00153 TIMESTAMP_TYPE_AGREEMENT = 0x2000,
00154 TIMESTAMP_TYPE_MASK = 0xF000,
00155 TIMESTAMP_TIMEZONE_MASK = 0x0FFF,
00156 } ecma_167_timezone_enum_t ;
00157
00158
00159 #define TIMESTAMP_TYPE_MASK 0xF000
00160 #define TIMESTAMP_TYPE_CUT 0x0000
00161 #define TIMESTAMP_TYPE_LOCAL 0x1000
00162 #define TIMESTAMP_TYPE_AGREEMENT 0x2000
00163 #define TIMESTAMP_TIMEZONE_MASK 0x0FFF
00164
00165 struct udf_id_suffix_s
00166 {
00167 udf_Uint16_t udf_revision;
00168 udf_Uint8_t os_class;
00169 udf_Uint8_t os_identifier;
00170 udf_Uint8_t reserved[4];
00171 } GNUC_PACKED;
00172
00173 typedef struct udf_id_suffix_s udf_id_suffix_t;
00174
00176 struct udf_regid_s
00177 {
00178 udf_Uint8_t flags;
00179 udf_Uint8_t id[UDF_REGID_ID_SIZE];
00180 udf_id_suffix_t id_suffix;
00181 } GNUC_PACKED;
00182
00183 typedef struct udf_regid_s udf_regid_t;
00184
00186 #define ENTITYID_FLAGS_DIRTY 0x00
00187 #define ENTITYID_FLAGS_PROTECTED 0x01
00188
00190 struct vol_struct_desc_s
00191 {
00192 udf_Uint8_t struct_type;
00193 udf_Uint8_t std_id[VSD_STD_ID_SIZE];
00194 udf_Uint8_t struct_version;
00195 udf_Uint8_t struct_data[2041];
00196 } GNUC_PACKED;
00197
00199 #define VSD_STD_ID_NSR02 "NSR02"
00200
00203
00204
00205 extern const char VSD_STD_ID_BEA01[sizeof("BEA01")-1];
00206 extern const char VSD_STD_ID_BOOT2[sizeof("BOOT2")-1];
00207 extern const char VSD_STD_ID_CD001[sizeof("CD001")-1];
00208 extern const char VSD_STD_ID_CDW01[sizeof("CDW02")-1];
00209 extern const char VSD_STD_ID_NSR03[sizeof("NSR03")-1];
00210 extern const char VSD_STD_ID_TEA01[sizeof("TEA01")-1];
00211
00212 #define VSD_STD_ID_BEA01 "BEA01"
00213 #define VSD_STD_ID_BOOT2 "BOOT2"
00214 #define VSD_STD_ID_CD001 "CD001"
00215 #define VSD_STD_ID_CDW02 "CDW02"
00216 #define VSD_STD_ID_NSR02 "NSR02"
00218 #define VSD_STD_ID_NSR03 "NSR03"
00219 #define VSD_STD_ID_TEA01 "TEA01"
00222 struct beginning_extended_area_desc_s
00223 {
00224 udf_Uint8_t struct_type;
00225 udf_Uint8_t std_id[VSD_STD_ID_SIZE];
00226 udf_Uint8_t struct_version;
00227 udf_Uint8_t struct_data[2041];
00228 } GNUC_PACKED;
00229
00231 struct terminating_extended_area_desc_s
00232 {
00233 udf_Uint8_t struct_type;
00234 udf_Uint8_t std_id[VSD_STD_ID_SIZE];
00235 udf_Uint8_t struct_version;
00236 udf_Uint8_t struct_data[2041];
00237 } GNUC_PACKED;
00238
00240 struct boot_desc_s
00241 {
00242 udf_Uint8_t struct_type;
00243 udf_Uint8_t std_ident[VSD_STD_ID_SIZE];
00244 udf_Uint8_t struct_version;
00245 udf_Uint8_t reserved1;
00246 udf_regid_t arch_type;
00247 udf_regid_t boot_ident;
00248 udf_Uint32_t bool_ext_location;
00249 udf_Uint32_t bool_ext_length;
00250 udf_Uint64_t load_address;
00251 udf_Uint64_t start_address;
00252 udf_timestamp_t desc_creation_time;
00253 udf_Uint16_t flags;
00254 udf_Uint8_t reserved2[32];
00255 udf_Uint8_t boot_use[1906];
00256 } GNUC_PACKED;
00257
00259 #define BOOT_FLAGS_ERASE 0x01
00260
00262 struct udf_extent_ad_s
00263 {
00264 udf_Uint32_t len;
00265 udf_Uint32_t loc;
00266 } GNUC_PACKED;
00267
00268 typedef struct udf_extent_ad_s udf_extent_ad_t;
00269
00271 struct udf_tag_s
00272 {
00273 udf_Uint16_t id;
00274 udf_Uint16_t desc_version;
00275 udf_Uint8_t cksum;
00276 udf_Uint8_t reserved;
00277 udf_Uint16_t i_serial;
00278 udf_Uint16_t desc_CRC;
00279 udf_Uint16_t desc_CRC_len;
00280 udf_Uint32_t loc;
00281 } GNUC_PACKED;
00282
00283 typedef struct udf_tag_s udf_tag_t;
00284
00286 struct NSR_desc_s
00287 {
00288 udf_Uint8_t struct_type;
00289 udf_Uint8_t std_id[VSD_STD_ID_SIZE];
00290 udf_Uint8_t struct_version;
00291 udf_Uint8_t reserved;
00292 udf_Uint8_t struct_data[2040];
00293 } GNUC_PACKED;
00294
00296 struct udf_pvd_s
00297 {
00298 udf_tag_t tag;
00299 udf_Uint32_t vol_desc_seq_num;
00300 udf_Uint32_t primary_vol_desc_num;
00301 udf_dstring vol_ident[UDF_VOLID_SIZE];
00302 udf_Uint16_t vol_seq_num;
00303 udf_Uint16_t max_vol_seqnum;
00304 udf_Uint16_t interchange_lvl;
00305 udf_Uint16_t max_interchange_lvl;
00306 udf_Uint32_t charset_list;
00307 udf_Uint32_t max_charset_list;
00308 udf_dstring volset_id[UDF_VOLSET_ID_SIZE];
00309 udf_charspec_t desc_charset;
00310 udf_charspec_t explanatory_charset;
00311 udf_extent_ad_t vol_abstract;
00312 udf_extent_ad_t vol_copyright;
00313 udf_regid_t app_ident;
00314 udf_timestamp_t recording_time;
00315 udf_regid_t imp_ident;
00316 udf_Uint8_t imp_use[64];
00317 udf_Uint32_t predecessor_vol_desc_seq_location;
00318 udf_Uint16_t flags;
00319 udf_Uint8_t reserved[22];
00320 } GNUC_PACKED;
00321
00322 typedef struct udf_pvd_s udf_pvd_t;
00323
00325 #define PVD_FLAGS_VSID_COMMON 0x0001
00326
00328 struct anchor_vol_desc_ptr_s
00329 {
00330 udf_tag_t tag;
00331 udf_extent_ad_t main_vol_desc_seq_ext;
00332 udf_extent_ad_t reserve_vol_desc_seq_ext;
00333 udf_Uint8_t reserved[480];
00334 } GNUC_PACKED;
00335
00336 typedef struct anchor_vol_desc_ptr_s anchor_vol_desc_ptr_t;
00337
00339 struct vol_desc_ptr_s
00340 {
00341 udf_tag_t tag;
00342 udf_Uint32_t vol_desc_seq_num;
00343 udf_extent_ad_t next_vol_desc_set_ext;
00344 udf_Uint8_t reserved[484];
00345 } GNUC_PACKED;
00346
00348 struct imp_use_vol_desc_s
00349 {
00350 udf_tag_t tag;
00351 udf_Uint32_t vol_desc_seq_num;
00352 udf_regid_t imp_id;
00353 udf_Uint8_t imp_use[460];
00354 } GNUC_PACKED;
00355
00357 struct partition_desc_s
00358 {
00359 udf_tag_t tag;
00360 udf_Uint32_t vol_desc_seq_num;
00361 udf_Uint16_t flags;
00362 udf_Uint16_t number;
00363 udf_regid_t contents;
00364 udf_Uint8_t contents_use[128];
00365 udf_Uint32_t access_type;
00366 udf_Uint32_t start_loc;
00367 udf_Uint32_t part_len;
00368 udf_regid_t imp_id;
00369 udf_Uint8_t imp_use[128];
00370 udf_Uint8_t reserved[156];
00371 } GNUC_PACKED;
00372
00373 typedef struct partition_desc_s partition_desc_t;
00374
00376 #define PD_PARTITION_FLAGS_ALLOC 0x0001
00377
00379 #define PD_PARTITION_CONTENTS_NSR02 "+NSR02"
00380
00382 #define PD_PARTITION_CONTENTS_FDC01 "+FDC01"
00383 #define PD_PARTITION_CONTENTS_CD001 "+CD001"
00384 #define PD_PARTITION_CONTENTS_CDW02 "+CDW02"
00385 #define PD_PARTITION_CONTENTS_NSR03 "+NSR03"
00386
00388 #define PD_ACCESS_TYPE_NONE 0x00000000
00389 #define PD_ACCESS_TYPE_READ_ONLY 0x00000001
00390 #define PD_ACCESS_TYPE_WRITE_ONCE 0x00000002
00391 #define PD_ACCESS_TYPE_REWRITABLE 0x00000003
00392 #define PD_ACCESS_TYPE_OVERWRITABLE 0x00000004
00393
00395 struct udf_lb_addr_s
00396 {
00397 udf_Uint32_t lba;
00398 udf_Uint16_t partitionReferenceNum;
00399 } GNUC_PACKED;
00400
00401 typedef struct udf_lb_addr_s udf_lb_addr_t;
00402
00404 struct udf_short_ad_s
00405 {
00406 udf_Uint32_t len;
00407 udf_Uint32_t pos;
00408 } GNUC_PACKED;
00409
00410 typedef struct udf_short_ad_s udf_short_ad_t;
00411
00413 struct udf_long_ad_s
00414 {
00415 udf_Uint32_t len;
00416 udf_lb_addr_t loc;
00417 udf_Uint8_t imp_use[6];
00418 } GNUC_PACKED;
00419
00420 typedef struct udf_long_ad_s udf_long_ad_t;
00421
00423 struct logical_vol_desc_s
00424 {
00425 udf_tag_t tag;
00426 udf_Uint32_t seq_num;
00427 udf_charspec_t desc_charset;
00428 udf_dstring logvol_id[128];
00429 udf_Uint32_t logical_blocksize;
00430 udf_regid_t domain_id;
00431 union {
00432 udf_long_ad_t fsd_loc;
00433 udf_Uint8_t logvol_content_use[16];
00434 } lvd_use;
00435 udf_Uint8_t logvol_contents_use[16];
00436 udf_Uint32_t maptable_len;
00437 udf_Uint32_t i_partition_maps;
00438 udf_regid_t imp_id;
00439 udf_Uint8_t imp_use[128];
00440 udf_extent_ad_t integrity_seq_ext;
00441 udf_Uint8_t partition_maps[0];
00442 } GNUC_PACKED;
00443
00444 typedef struct logical_vol_desc_s logical_vol_desc_t;
00445
00447 struct generic_partition_map
00448 {
00449 udf_Uint8_t partition_map_type;
00450 udf_Uint8_t partition_map_length;
00451 udf_Uint8_t partition_mapping[0];
00452 } GNUC_PACKED;
00453
00455 #define GP_PARTITION_MAP_TYPE_UNDEF 0x00
00456 #define GP_PARTIITON_MAP_TYPE_1 0x01
00457 #define GP_PARTITION_MAP_TYPE_2 0x02
00458
00460 struct generic_partition_map1
00461 {
00462 udf_Uint8_t partition_map_type;
00463 udf_Uint8_t partition_map_length;
00464 udf_Uint16_t vol_seq_num;
00465 udf_Uint16_t i_partition;
00466 } GNUC_PACKED;
00467
00469 struct generic_partition_map2
00470 {
00471 udf_Uint8_t partition_map_type;
00472 udf_Uint8_t partition_map_length;
00473 udf_Uint8_t partition_id[62];
00474 } GNUC_PACKED;
00475
00477 struct unalloc_space_desc_s
00478 {
00479 udf_tag_t tag;
00480 udf_Uint32_t vol_desc_seq_num;
00481 udf_Uint32_t i_alloc_descs;
00482 udf_extent_ad_t allocDescs[0];
00483 } GNUC_PACKED;
00484
00486 struct terminating_desc_s
00487 {
00488 udf_tag_t tag;
00489 udf_Uint8_t reserved[496];
00490 } GNUC_PACKED;
00491
00493 struct logvol_integrity_desc_s
00494 {
00495 udf_tag_t tag;
00496 udf_timestamp_t recording_time;
00497 udf_Uint32_t integrity_type;
00498 udf_extent_ad_t next_integrity_ext;
00499 udf_Uint8_t logvol_contents_use[32];
00500 udf_Uint32_t i_partitions;
00501 udf_Uint32_t imp_use_len;
00502 udf_Uint32_t freespace_table[0];
00503 udf_Uint32_t size_table[0];
00504 udf_Uint8_t imp_use[0];
00505 } GNUC_PACKED;
00506
00508 #define LVID_INTEGRITY_TYPE_OPEN 0x00000000
00509 #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001
00510
00512 struct udf_ext_ad_s
00513 {
00514 udf_Uint32_t len;
00515 udf_Uint32_t recorded_len;
00516 udf_Uint32_t information_len;
00517 udf_lb_addr_t ext_loc;
00518 } GNUC_PACKED;
00519
00520 typedef struct udf_ext_ad_s udf_ext_ad_t;
00521
00527 struct udf_fsd_s
00528 {
00529 udf_tag_t tag;
00530 udf_timestamp_t recording_time;
00531 udf_Uint16_t interchange_lvl;
00532 udf_Uint16_t maxInterchange_lvl;
00533 udf_Uint32_t charset_list;
00534 udf_Uint32_t max_charset_list;
00535 udf_Uint32_t fileset_num;
00536 udf_Uint32_t udf_fsd_num;
00537 udf_charspec_t logical_vol_id_charset;
00538 udf_dstring logical_vol_id[128];
00539 udf_charspec_t fileset_charset;
00540 udf_dstring fileSet_id[32];
00541 udf_dstring copyright_file_id[32];
00542 udf_dstring abstract_file_id[32];
00543 udf_long_ad_t root_icb;
00544 udf_regid_t domain_id;
00545 udf_long_ad_t next_ext;
00546 udf_long_ad_t stream_directory_ICB;
00547 udf_Uint8_t reserved[32];
00548 } GNUC_PACKED;
00549
00550 typedef struct udf_fsd_s udf_fsd_t;
00551
00553 struct partition_header_desc_s
00554 {
00555 udf_short_ad_t unalloc_space_table;
00556 udf_short_ad_t unalloc_space_bitmap;
00557 udf_short_ad_t partition_integrity_table;
00558 udf_short_ad_t freed_space_table;
00559 udf_short_ad_t freed_space_bitmap;
00560 udf_Uint8_t reserved[88];
00561 } GNUC_PACKED;
00562
00563 typedef struct partition_header_desc_s partition_header_desc_t;
00564
00566 struct udf_fileid_desc_s
00567 {
00568 udf_tag_t tag;
00569 udf_Uint16_t file_version_num;
00570 udf_Uint8_t file_characteristics;
00571 udf_Uint8_t i_file_id;
00572 udf_long_ad_t icb;
00573 udf_Uint16_t i_imp_use;
00574 udf_Uint8_t imp_use[0];
00575 udf_Uint8_t file_id[0];
00576 udf_Uint8_t padding[0];
00577 } GNUC_PACKED;
00578
00579 typedef struct udf_fileid_desc_s udf_fileid_desc_t;
00580
00586 typedef enum {
00587 UDF_FILE_HIDDEN = (1 << 0),
00588 UDF_FILE_DIRECTORY = (1 << 1),
00589 UDF_FILE_DELETED = (1 << 2),
00590 UDF_FILE_PARENT = (1 << 3),
00591 UDF_FILE_METADATA = (1 << 4)
00592 } file_characteristics_t;
00593
00595 struct allocExtDesc
00596 {
00597 udf_tag_t tag;
00598 udf_Uint32_t previous_alloc_ext_loc;
00599 udf_Uint32_t i_alloc_descs;
00600 } GNUC_PACKED;
00601
00603 struct udf_icbtag_s
00604 {
00605 udf_Uint32_t prev_num_dirs;
00606 udf_Uint16_t strat_type;
00607 udf_Uint16_t strat_param;
00608 udf_Uint16_t max_num_entries;
00609 udf_Uint8_t reserved;
00610 udf_Uint8_t file_type;
00611 udf_lb_addr_t parent_ICB;
00612 udf_Uint16_t flags;
00613 } GNUC_PACKED;
00614
00615 typedef struct udf_icbtag_s udf_icbtag_t;
00616
00617 #define UDF_ICB_TAG_FLAGS_SETUID 0x40
00618 #define UDF_ICB_TAG_FLAGS_SETGID 0x80
00619 #define UDF_ICB_TAG_FLAGS_STICKY 0x100
00620
00623 #define ICBTAG_STRATEGY_TYPE_UNDEF 0x0000
00624 #define ICBTAG_STRATEGY_TYPE_1 0x0001
00625 #define ICBTAG_STRATEGY_TYPE_2 0x0002
00626 #define ICBTAG_STRATEGY_TYPE_3 0x0003
00627 #define ICBTAG_STRATEGY_TYPE_4 0x0004
00637 typedef enum {
00638 ICBTAG_FILE_TYPE_UNDEF = 0x00,
00639 ICBTAG_FILE_TYPE_USE = 0x01,
00640 ICBTAG_FILE_TYPE_PIE = 0x02,
00641 ICBTAG_FILE_TYPE_IE = 0x03,
00642 ICBTAG_FILE_TYPE_DIRECTORY = 0x04,
00643 ICBTAG_FILE_TYPE_REGULAR = 0x05,
00644 ICBTAG_FILE_TYPE_BLOCK = 0x06,
00645 ICBTAG_FILE_TYPE_CHAR = 0x07,
00646 ICBTAG_FILE_TYPE_EA = 0x08,
00647 ICBTAG_FILE_TYPE_FIFO = 0x09,
00648 ICBTAG_FILE_TYPE_SOCKET = 0x0A,
00649 ICBTAG_FILE_TYPE_TE = 0x0B,
00650 ICBTAG_FILE_TYPE_SYMLINK = 0x0C,
00651 ICBTAG_FILE_TYPE_STREAMDIR = 0x0D
00652 } icbtag_file_type_enum_t;
00653
00655 typedef enum {
00656 ICBTAG_FLAG_AD_MASK = 0x0007,
00658 ICBTAG_FLAG_AD_SHORT = 0x0000,
00664 ICBTAG_FLAG_AD_LONG = 0x0001,
00670 ICBTAG_FLAG_AD_EXTENDED = 0x0002,
00671 ICBTAG_FLAG_AD_IN_ICB = 0x0003,
00675 ICBTAG_FLAG_SORTED = 0x0008,
00676 ICBTAG_FLAG_NONRELOCATABLE = 0x0010,
00677 ICBTAG_FLAG_ARCHIVE = 0x0020,
00678 ICBTAG_FLAG_SETUID = 0x0040,
00679 ICBTAG_FLAG_SETGID = 0x0080,
00680 ICBTAG_FLAG_STICKY = 0x0100,
00681 ICBTAG_FLAG_CONTIGUOUS = 0x0200,
00682 ICBTAG_FLAG_SYSTEM = 0x0400,
00683 ICBTAG_FLAG_TRANSFORMED = 0x0800,
00684 ICBTAG_FLAG_MULTIVERSIONS = 0x1000,
00685 ICBTAG_FLAG_STREAM = 0x2000
00686 } icbtag_flag_enum_t;
00687
00689 struct indirect_entry_s
00690 {
00691 udf_tag_t tag;
00692 udf_icbtag_t icb_tag;
00693 udf_long_ad_t indirect_ICB;
00694 } GNUC_PACKED;
00695
00697 struct terminal_entry_s
00698 {
00699 udf_tag_t tag;
00700 udf_icbtag_t icb_tag;
00701 } GNUC_PACKED;
00702
00704 struct udf_file_entry_s
00705 {
00706 udf_tag_t tag;
00707 udf_icbtag_t icb_tag;
00708 udf_Uint32_t uid;
00709 udf_Uint32_t gid;
00710 udf_Uint32_t permissions;
00711 udf_Uint16_t link_count;
00712 udf_Uint8_t rec_format;
00713 udf_Uint8_t rec_disp_attr;
00714 udf_Uint32_t rec_len;
00715 udf_Uint64_t info_len;
00716 udf_Uint64_t logblks_recorded;
00717 udf_timestamp_t access_time;
00720 udf_timestamp_t modification_time;
00723 udf_timestamp_t attribute_time;
00724 udf_Uint32_t checkpoint;
00725 udf_long_ad_t ext_attr_ICB;
00726 udf_regid_t imp_id;
00727 udf_Uint64_t unique_ID;
00728 udf_Uint32_t i_extended_attr;
00729 udf_Uint32_t i_alloc_descs;
00730 udf_Uint8_t ext_attr[0];
00731 udf_Uint8_t alloc_descs[0];
00732 } GNUC_PACKED;
00733
00734 typedef struct udf_file_entry_s udf_file_entry_t;
00735
00736 #define UDF_FENTRY_SIZE 176
00737 #define UDF_FENTRY_PERM_USER_MASK 0x07
00738 #define UDF_FENTRY_PERM_GRP_MASK 0xE0
00739 #define UDF_FENTRY_PERM_OWNER_MASK 0x1C00
00740
00742 #define FE_PERM_O_EXEC 0x00000001U
00743 #define FE_PERM_O_WRITE 0x00000002U
00744 #define FE_PERM_O_READ 0x00000004U
00745 #define FE_PERM_O_CHATTR 0x00000008U
00746 #define FE_PERM_O_DELETE 0x00000010U
00747 #define FE_PERM_G_EXEC 0x00000020U
00748 #define FE_PERM_G_WRITE 0x00000040U
00749 #define FE_PERM_G_READ 0x00000080U
00750 #define FE_PERM_G_CHATTR 0x00000100U
00751 #define FE_PERM_G_DELETE 0x00000200U
00752 #define FE_PERM_U_EXEC 0x00000400U
00753 #define FE_PERM_U_WRITE 0x00000800U
00754 #define FE_PERM_U_READ 0x00001000U
00755 #define FE_PERM_U_CHATTR 0x00002000U
00756 #define FE_PERM_U_DELETE 0x00004000U
00757
00759 #define FE_RECORD_FMT_UNDEF 0x00
00760 #define FE_RECORD_FMT_FIXED_PAD 0x01
00761 #define FE_RECORD_FMT_FIXED 0x02
00762 #define FE_RECORD_FMT_VARIABLE8 0x03
00763 #define FE_RECORD_FMT_VARIABLE16 0x04
00764 #define FE_RECORD_FMT_VARIABLE16_MSB 0x05
00765 #define FE_RECORD_FMT_VARIABLE32 0x06
00766 #define FE_RECORD_FMT_PRINT 0x07
00767 #define FE_RECORD_FMT_LF 0x08
00768 #define FE_RECORD_FMT_CR 0x09
00769 #define FE_RECORD_FMT_CRLF 0x0A
00770 #define FE_RECORD_FMT_LFCR 0x0B
00771
00773 #define FE_RECORD_DISPLAY_ATTR_UNDEF 0x00
00774 #define FE_RECORD_DISPLAY_ATTR_1 0x01
00775 #define FE_RECORD_DISPLAY_ATTR_2 0x02
00776 #define FE_RECORD_DISPLAY_ATTR_3 0x03
00777
00779 struct extended_attr_header_desc_s
00780 {
00781 udf_tag_t tag;
00782 udf_Uint32_t imp_attr_location;
00783 udf_Uint32_t app_attr_location;
00784 } GNUC_PACKED;
00785
00787 struct generic_format_s
00788 {
00789 udf_Uint32_t attr_type;
00790 udf_Uint8_t attr_subtype;
00791 udf_Uint8_t reserved[3];
00792 udf_Uint32_t attrLength;
00793 udf_Uint8_t attrData[0];
00794 } GNUC_PACKED;
00795
00797 struct charSet_info_s
00798 {
00799 udf_Uint32_t attr_type;
00800 udf_Uint8_t attr_subtype;
00801 udf_Uint8_t reserved[3];
00802 udf_Uint32_t attrLength;
00803 udf_Uint32_t escapeSeqLength;
00804 udf_Uint8_t charSetType;
00805 udf_Uint8_t escapeSeq[0];
00806 } GNUC_PACKED;
00807
00808
00809 struct alt_perms_s
00810 {
00811 udf_Uint32_t attr_type;
00812 udf_Uint8_t attr_subtype;
00813 udf_Uint8_t reserved[3];
00814 udf_Uint32_t attrLength;
00815 udf_Uint16_t owner_id;
00816 udf_Uint16_t group_id;
00817 udf_Uint16_t permission;
00818 } GNUC_PACKED;
00819
00821 struct filetimes_ext_attr_s
00822 {
00823 udf_Uint32_t attr_type;
00824 udf_Uint8_t attr_subtype;
00825 udf_Uint8_t reserved[3];
00826 udf_Uint32_t attrLength;
00827 udf_Uint32_t dataLength;
00828 udf_Uint32_t fileTimeExistence;
00829 udf_Uint8_t fileTimes;
00830 } GNUC_PACKED;
00831
00833 #define FTE_CREATION 0x00000001
00834 #define FTE_DELETION 0x00000004
00835 #define FTE_EFFECTIVE 0x00000008
00836 #define FTE_BACKUP 0x00000002
00837
00839 struct infoTimesExtAttr
00840 {
00841 udf_Uint32_t attr_type;
00842 udf_Uint8_t attr_subtype;
00843 udf_Uint8_t reserved[3];
00844 udf_Uint32_t attrLength;
00845 udf_Uint32_t dataLength;
00846 udf_Uint32_t infoTimeExistence;
00847 udf_Uint8_t infoTimes[0];
00848 } GNUC_PACKED;
00849
00851 struct deviceSpec
00852 {
00853 udf_Uint32_t attr_type;
00854 udf_Uint8_t attr_subtype;
00855 udf_Uint8_t reserved[3];
00856 udf_Uint32_t attrLength;
00857 udf_Uint32_t imp_useLength;
00858 udf_Uint32_t majorDevice_id;
00859 udf_Uint32_t minorDevice_id;
00860 udf_Uint8_t imp_use[0];
00861 } GNUC_PACKED;
00862
00864 struct impUseExtAttr
00865 {
00866 udf_Uint32_t attr_type;
00867 udf_Uint8_t attr_subtype;
00868 udf_Uint8_t reserved[3];
00869 udf_Uint32_t attrLength;
00870 udf_Uint32_t imp_useLength;
00871 udf_regid_t imp_id;
00872 udf_Uint8_t imp_use[0];
00873 } GNUC_PACKED;
00874
00876 struct appUseExtAttr
00877 {
00878 udf_Uint32_t attr_type;
00879 udf_Uint8_t attr_subtype;
00880 udf_Uint8_t reserved[3];
00881 udf_Uint32_t attrLength;
00882 udf_Uint32_t appUseLength;
00883 udf_regid_t app_id;
00884 udf_Uint8_t appUse[0];
00885 } GNUC_PACKED;
00886
00887 #define EXTATTR_CHAR_SET 1
00888 #define EXTATTR_ALT_PERMS 3
00889 #define EXTATTR_FILE_TIMES 5
00890 #define EXTATTR_INFO_TIMES 6
00891 #define EXTATTR_DEV_SPEC 12
00892 #define EXTATTR_IMP_USE 2048
00893 #define EXTATTR_APP_USE 65536
00894
00895
00897 struct unallocSpaceEntry
00898 {
00899 udf_tag_t tag;
00900 udf_icbtag_t icb_tag;
00901 udf_Uint32_t lengthAllocDescs;
00902 udf_Uint8_t allocDescs[0];
00903 } GNUC_PACKED;
00904
00906 struct spaceBitmapDesc
00907 {
00908 udf_tag_t tag;
00909 udf_Uint32_t i_bits;
00910 udf_Uint32_t i_bytes;
00911 udf_Uint8_t bitmap[0];
00912 } GNUC_PACKED;
00913
00915 struct partitionIntegrityEntry
00916 {
00917 udf_tag_t tag;
00918 udf_icbtag_t icb_tag;
00919 udf_timestamp_t recording_time;
00920 udf_Uint8_t integrityType;
00921 udf_Uint8_t reserved[175];
00922 udf_regid_t imp_id;
00923 udf_Uint8_t imp_use[256];
00924 } GNUC_PACKED;
00925
00929 #define EXT_RECORDED_ALLOCATED 0x00000000
00930 #define EXT_NOT_RECORDED_ALLOCATED 0x40000000
00931 #define EXT_NOT_RECORDED_NOT_ALLOCATED 0x80000000
00932 #define EXT_NEXT_EXTENT_ALLOCDECS 0xC0000000
00933
00939 struct logical_vol_header_desc_s
00940 {
00941 udf_Uint64_t uniqueID;
00942 udf_Uint8_t reserved[24];
00943 } GNUC_PACKED;
00944
00945 typedef struct logical_vol_header_desc_s logical_vol_header_desc_t;
00946
00948 struct pathComponent
00949 {
00950 udf_Uint8_t component_type;
00951 udf_Uint8_t lengthComponent_id;
00952 udf_Uint16_t componentFileVersionNum;
00953 udf_dstring component_id[0];
00954 } GNUC_PACKED;
00955
00957 struct extended_file_entry
00958 {
00959 udf_tag_t tag;
00960 udf_icbtag_t icb_tag;
00961 udf_Uint32_t uid;
00962 udf_Uint32_t gid;
00963 udf_Uint32_t permissions;
00964 udf_Uint16_t link_count;
00965 udf_Uint8_t rec_format;
00966 udf_Uint8_t rec_display_attr;
00967 udf_Uint32_t record_len;
00968 udf_Uint64_t info_len;
00969 udf_Uint64_t object_size;
00970 udf_Uint64_t logblks_recorded;
00971 udf_timestamp_t access_time;
00973 udf_timestamp_t modification_time;
00976 udf_timestamp_t create_time;
00977 udf_timestamp_t attribute_time;
00980 udf_Uint32_t checkpoint;
00981 udf_Uint32_t reserved;
00982 udf_long_ad_t ext_attr_ICB;
00983 udf_long_ad_t stream_directory_ICB;
00984 udf_regid_t imp_id;
00985 udf_Uint64_t unique_ID;
00986 udf_Uint32_t length_extended_attr;
00987 udf_Uint32_t length_alloc_descs;
00988 udf_Uint8_t ext_attr[0];
00989 udf_Uint8_t alloc_descs[0];
00990 } GNUC_PACKED;
00991
00992 PRAGMA_END_PACKED
00993
00999 extern tag_id_t debug_tagid;
01000 extern file_characteristics_t debug_file_characteristics;
01001 extern icbtag_file_type_enum_t debug_icbtag_file_type_enum;
01002 extern icbtag_flag_enum_t debug_flag_enum;
01003 extern ecma_167_enum1_t debug_ecma_167_enum1;
01004 extern ecma_167_timezone_enum_t debug_ecma_167_timezone_enum;
01005
01006 #endif