libcdio  0.83
ecma_167.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2005, 2006, 2008 Rocky Bernstein <rocky@cpan.org>
3  Copyright (c) 2001-2002 Ben Fennema <bfennema@falcon.csc.calpoly.edu>
4 
5  This program is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 3 of the License, or
8  (at your option) any later version.
9 
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 /*
19  * Some portions taken from FreeBSD ecma167-udf.h which states:
20  * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org>
21  * All rights reserved.
22  *
23  * Redistribution and use in source and binary forms, with or without
24  * modification, are permitted provided that the following conditions
25  * are met:
26  * 1. Redistributions of source code must retain the above copyright
27  * notice, this list of conditions and the following disclaimer.
28  * 2. Redistributions in binary form must reproduce the above copyright
29  * notice, this list of conditions and the following disclaimer in the
30  * documentation and/or other materials provided with the distribution.
31  *
32  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
33  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
36  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
40  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
41  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
42  * SUCH DAMAGE.
43  */
44 
52 #ifndef _ECMA_167_H
53 #define _ECMA_167_H 1
54 
55 #include <cdio/types.h>
56 
61 typedef enum {
69 
72 typedef enum {
73  TAGID_PRI_VOL = 0x0001,
74  TAGID_ANCHOR = 0x0002,
75  TAGID_VOL = 0x0003,
76  TAGID_IMP_VOL = 0x0004,
77  TAGID_PARTITION = 0x0005,
78  TAGID_LOGVOL = 0x0006,
80  TAGID_TERM = 0x0008,
82  TAGID_FSD = 0x0100,
83  TAGID_FID = 0x0101,
84  TAGID_AED = 0x0102,
85  TAGID_IE = 0x0103,
86  TAGID_TE = 0x0104,
87  TAGID_FILE_ENTRY = 0x0105,
88  TAGID_EAHD = 0x0106,
89  TAGID_USE = 0x0107,
90  TAGID_SBD = 0x0108,
91  TAGID_PIE = 0x0109,
92  TAGID_EFE = 0x010A,
93 } tag_id_t ;
94 
96 typedef enum {
108 
109 typedef uint8_t udf_Uint8_t;
110 typedef uint16_t udf_Uint16_t;
111 typedef uint32_t udf_Uint32_t;
112 typedef uint64_t udf_Uint64_t;
113 typedef char udf_dstring;
115 #define UDF_LENGTH_MASK 0x3fffffff
116 
118 
121 {
124 } GNUC_PACKED;
125 
127 
130 {
141 } GNUC_PACKED;
142 
144 
150 typedef enum {
157 
158 
159 #define TIMESTAMP_TYPE_MASK 0xF000
160 #define TIMESTAMP_TYPE_CUT 0x0000
161 #define TIMESTAMP_TYPE_LOCAL 0x1000
162 #define TIMESTAMP_TYPE_AGREEMENT 0x2000
163 #define TIMESTAMP_TIMEZONE_MASK 0x0FFF
164 
166 {
171 } GNUC_PACKED;
172 
174 
177 {
181 } GNUC_PACKED;
182 
183 typedef struct udf_regid_s udf_regid_t;
184 
186 #define ENTITYID_FLAGS_DIRTY 0x00
187 #define ENTITYID_FLAGS_PROTECTED 0x01
188 
191 {
196 } GNUC_PACKED;
197 
199 #define VSD_STD_ID_NSR02 "NSR02" /* (3/9.1) */
200 
203 /* The below const definitions are to faciltate debugging of the
204  values #define'd below. */
205 extern const char VSD_STD_ID_BEA01[sizeof("BEA01")-1];
206 extern const char VSD_STD_ID_BOOT2[sizeof("BOOT2")-1];
207 extern const char VSD_STD_ID_CD001[sizeof("CD001")-1];
208 extern const char VSD_STD_ID_CDW01[sizeof("CDW02")-1];
209 extern const char VSD_STD_ID_NSR03[sizeof("NSR03")-1];
210 extern const char VSD_STD_ID_TEA01[sizeof("TEA01")-1];
211 
212 #define VSD_STD_ID_BEA01 "BEA01"
213 #define VSD_STD_ID_BOOT2 "BOOT2"
214 #define VSD_STD_ID_CD001 "CD001"
215 #define VSD_STD_ID_CDW02 "CDW02"
216 #define VSD_STD_ID_NSR02 "NSR02"
218 #define VSD_STD_ID_NSR03 "NSR03"
219 #define VSD_STD_ID_TEA01 "TEA01"
222 struct beginning_extended_area_desc_s
223 {
227  udf_Uint8_t struct_data[2041];
228 } GNUC_PACKED;
229 
232 {
237 } GNUC_PACKED;
238 
241 {
256 } GNUC_PACKED;
257 
259 #define BOOT_FLAGS_ERASE 0x01
260 
263 {
266 } GNUC_PACKED;
267 
269 
271 struct udf_tag_s
272 {
281 } GNUC_PACKED;
282 
283 typedef struct udf_tag_s udf_tag_t;
284 
287 {
293 } GNUC_PACKED;
294 
296 struct udf_pvd_s
297 {
320 } GNUC_PACKED;
321 
322 typedef struct udf_pvd_s udf_pvd_t;
323 
325 #define PVD_FLAGS_VSID_COMMON 0x0001
326 
329 {
334 } GNUC_PACKED;
335 
337 
340 {
345 } GNUC_PACKED;
346 
349 {
354 } GNUC_PACKED;
355 
358 {
371 } GNUC_PACKED;
372 
374 
376 #define PD_PARTITION_FLAGS_ALLOC 0x0001
377 
379 #define PD_PARTITION_CONTENTS_NSR02 "+NSR02"
380 
382 #define PD_PARTITION_CONTENTS_FDC01 "+FDC01"
383 #define PD_PARTITION_CONTENTS_CD001 "+CD001"
384 #define PD_PARTITION_CONTENTS_CDW02 "+CDW02"
385 #define PD_PARTITION_CONTENTS_NSR03 "+NSR03"
386 
388 #define PD_ACCESS_TYPE_NONE 0x00000000
389 #define PD_ACCESS_TYPE_READ_ONLY 0x00000001
390 #define PD_ACCESS_TYPE_WRITE_ONCE 0x00000002
391 #define PD_ACCESS_TYPE_REWRITABLE 0x00000003
392 #define PD_ACCESS_TYPE_OVERWRITABLE 0x00000004
393 
396 {
399 } GNUC_PACKED;
400 
402 
405 {
408 } GNUC_PACKED;
409 
411 
414 {
418 } GNUC_PACKED;
419 
421 
424 {
431  union {
434  } lvd_use;
442 } GNUC_PACKED;
443 
445 
448 {
452 } GNUC_PACKED;
453 
455 #define GP_PARTITION_MAP_TYPE_UNDEF 0x00
456 #define GP_PARTIITON_MAP_TYPE_1 0x01
457 #define GP_PARTITION_MAP_TYPE_2 0x02
458 
461 {
466 } GNUC_PACKED;
467 
470 {
474 } GNUC_PACKED;
475 
478 {
483 } GNUC_PACKED;
484 
487 {
490 } GNUC_PACKED;
491 
494 {
505 } GNUC_PACKED;
506 
508 #define LVID_INTEGRITY_TYPE_OPEN 0x00000000
509 #define LVID_INTEGRITY_TYPE_CLOSE 0x00000001
510 
513 {
518 } GNUC_PACKED;
519 
520 typedef struct udf_ext_ad_s udf_ext_ad_t;
521 
527 struct udf_fsd_s
528 {
548 } GNUC_PACKED;
549 
550 typedef struct udf_fsd_s udf_fsd_t;
551 
554 {
561 } GNUC_PACKED;
562 
564 
567 {
577 } GNUC_PACKED;
578 
580 
586 typedef enum {
587  UDF_FILE_HIDDEN = (1 << 0),
588  UDF_FILE_DIRECTORY = (1 << 1),
589  UDF_FILE_DELETED = (1 << 2),
590  UDF_FILE_PARENT = (1 << 3),
591  UDF_FILE_METADATA = (1 << 4)
593 
596 {
600 } GNUC_PACKED;
601 
604 {
613 } GNUC_PACKED;
614 
615 typedef struct udf_icbtag_s udf_icbtag_t;
616 
617 #define UDF_ICB_TAG_FLAGS_SETUID 0x40
618 #define UDF_ICB_TAG_FLAGS_SETGID 0x80
619 #define UDF_ICB_TAG_FLAGS_STICKY 0x100
620 
623 #define ICBTAG_STRATEGY_TYPE_UNDEF 0x0000
624 #define ICBTAG_STRATEGY_TYPE_1 0x0001
625 #define ICBTAG_STRATEGY_TYPE_2 0x0002
626 #define ICBTAG_STRATEGY_TYPE_3 0x0003
627 #define ICBTAG_STRATEGY_TYPE_4 0x0004
637 typedef enum {
653 
655 typedef enum {
687 
690 {
694 } GNUC_PACKED;
695 
698 {
701 } GNUC_PACKED;
702 
705 {
732 } GNUC_PACKED;
733 
735 
736 #define UDF_FENTRY_SIZE 176
737 #define UDF_FENTRY_PERM_USER_MASK 0x07
738 #define UDF_FENTRY_PERM_GRP_MASK 0xE0
739 #define UDF_FENTRY_PERM_OWNER_MASK 0x1C00
740 
742 #define FE_PERM_O_EXEC 0x00000001U
743 #define FE_PERM_O_WRITE 0x00000002U
744 #define FE_PERM_O_READ 0x00000004U
745 #define FE_PERM_O_CHATTR 0x00000008U
746 #define FE_PERM_O_DELETE 0x00000010U
747 #define FE_PERM_G_EXEC 0x00000020U
748 #define FE_PERM_G_WRITE 0x00000040U
749 #define FE_PERM_G_READ 0x00000080U
750 #define FE_PERM_G_CHATTR 0x00000100U
751 #define FE_PERM_G_DELETE 0x00000200U
752 #define FE_PERM_U_EXEC 0x00000400U
753 #define FE_PERM_U_WRITE 0x00000800U
754 #define FE_PERM_U_READ 0x00001000U
755 #define FE_PERM_U_CHATTR 0x00002000U
756 #define FE_PERM_U_DELETE 0x00004000U
757 
759 #define FE_RECORD_FMT_UNDEF 0x00
760 #define FE_RECORD_FMT_FIXED_PAD 0x01
761 #define FE_RECORD_FMT_FIXED 0x02
762 #define FE_RECORD_FMT_VARIABLE8 0x03
763 #define FE_RECORD_FMT_VARIABLE16 0x04
764 #define FE_RECORD_FMT_VARIABLE16_MSB 0x05
765 #define FE_RECORD_FMT_VARIABLE32 0x06
766 #define FE_RECORD_FMT_PRINT 0x07
767 #define FE_RECORD_FMT_LF 0x08
768 #define FE_RECORD_FMT_CR 0x09
769 #define FE_RECORD_FMT_CRLF 0x0A
770 #define FE_RECORD_FMT_LFCR 0x0B
771 
773 #define FE_RECORD_DISPLAY_ATTR_UNDEF 0x00
774 #define FE_RECORD_DISPLAY_ATTR_1 0x01
775 #define FE_RECORD_DISPLAY_ATTR_2 0x02
776 #define FE_RECORD_DISPLAY_ATTR_3 0x03
777 
780 {
784 } GNUC_PACKED;
785 
788 {
794 } GNUC_PACKED;
795 
798 {
806 } GNUC_PACKED;
807 
808 /* Alternate Permissions (ECMA 167r3 4/14.10.4) */
810 {
818 } GNUC_PACKED;
819 
822 {
830 } GNUC_PACKED;
831 
833 #define FTE_CREATION 0x00000001
834 #define FTE_DELETION 0x00000004
835 #define FTE_EFFECTIVE 0x00000008
836 #define FTE_BACKUP 0x00000002
837 
840 {
848 } GNUC_PACKED;
849 
852 {
861 } GNUC_PACKED;
862 
865 {
873 } GNUC_PACKED;
874 
877 {
885 } GNUC_PACKED;
886 
887 #define EXTATTR_CHAR_SET 1
888 #define EXTATTR_ALT_PERMS 3
889 #define EXTATTR_FILE_TIMES 5
890 #define EXTATTR_INFO_TIMES 6
891 #define EXTATTR_DEV_SPEC 12
892 #define EXTATTR_IMP_USE 2048
893 #define EXTATTR_APP_USE 65536
894 
895 
898 {
903 } GNUC_PACKED;
904 
907 {
912 } GNUC_PACKED;
913 
916 {
924 } GNUC_PACKED;
925 
929 #define EXT_RECORDED_ALLOCATED 0x00000000
930 #define EXT_NOT_RECORDED_ALLOCATED 0x40000000
931 #define EXT_NOT_RECORDED_NOT_ALLOCATED 0x80000000
932 #define EXT_NEXT_EXTENT_ALLOCDECS 0xC0000000
933 
940 {
943 } GNUC_PACKED;
944 
946 
949 {
954 } GNUC_PACKED;
955 
958 {
990 } GNUC_PACKED;
991 
993 
999 extern tag_id_t debug_tagid;
1005 
1006 #endif /* _ECMA_167_H */

Generated for libcdio by doxygen 1.8.1.1