~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Linux/include/linux/udf_udf.h

Version: ~ [ 2.4.0 ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #if !defined(_LINUX_UDF_UDF_H)
  2 #define _LINUX_UDF_UDF_H
  3 /*
  4  * udf_udf.h
  5  *
  6  * PURPOSE
  7  *      OSTA-UDF(tm) format specification [based on ECMA 167 standard].
  8  *      http://www.osta.org/
  9  *
 10  * CONTACTS
 11  *      E-mail regarding any portion of the Linux UDF file system should be
 12  *      directed to the development team mailing list (run by majordomo):
 13  *              linux_udf@hootie.lvld.hp.com
 14  *
 15  * COPYRIGHT
 16  *      This file is distributed under the terms of the GNU General Public
 17  *      License (GPL). Copies of the GPL can be obtained from:
 18  *              ftp://prep.ai.mit.edu/pub/gnu/GPL
 19  *      Each contributing author retains all rights to their own work.
 20  *
 21  * HISTORY
 22  *      July 1, 1997 - Andrew E. Mileski
 23  *      Written, tested, and released.
 24  *
 25  * 10/2/98 dgb  changed UDF_ID_DEVELOPER
 26  * 11/26/98 bf  changed UDF_ID_DEVELOPER, 
 27  * 12/5/98 dgb  updated include file hierarchy, more UDF definitions
 28  */
 29 
 30 /* based on ECMA 167 structure definitions */
 31 #include <linux/udf_167.h>
 32 
 33 #pragma pack(1)
 34 
 35 /* -------- Basic types and constants ----------- */
 36 /* UDF character set (UDF 1.50 2.1.2) */
 37 #define UDF_CHAR_SET_TYPE       0
 38 #define UDF_CHAR_SET_INFO       "OSTA Compressed Unicode"
 39 
 40 #define UDF_ID_DEVELOPER        "*Linux UDFFS"
 41  
 42 /* UDF 1.02 2.2.6.4 */
 43 struct LogicalVolIntegrityDescImpUse
 44 {
 45         EntityID        impIdent;
 46         Uint32          numFiles;
 47         Uint32          numDirs;
 48         Uint16          minUDFReadRev;
 49         Uint16          minUDFWriteRev;
 50         Uint16          maxUDFWriteRev;
 51 };
 52 
 53 /* UDF 1.02 2.2.7.2 */
 54 /* LVInformation may be present in ImpUseVolDesc.impUse */
 55 struct ImpUseVolDescImpUse
 56 {
 57         charspec        LVICharset;
 58         dstring         logicalVolIdent[128];
 59         dstring         LVInfo1[36];
 60         dstring         LVInfo2[36];
 61         dstring         LVInfo3[36];
 62         EntityID        impIdent;
 63         Uint8           impUse[128];
 64 };
 65 
 66 struct UdfPartitionMap2
 67 {
 68         Uint8           partitionMapType;
 69         Uint8           partitionMapLength;
 70         Uint8           reserved1[2];
 71         EntityID        partIdent;
 72         Uint16          volSeqNum;
 73         Uint16          partitionNum;
 74         Uint8           reserved2[24];
 75 };
 76 
 77 /* UDF 1.5 2.2.8 */
 78 struct VirtualPartitionMap
 79 {
 80         Uint8           partitionMapType;       /* 2 */
 81         Uint8           partitionMapLength;     /* 64 */
 82         Uint8           reserved1[2];           /* #00 */
 83         EntityID        partIdent;
 84         Uint16          volSeqNum;
 85         Uint16          partitionNum;
 86         Uint8           reserved2[24];          /* #00 */
 87 };
 88 
 89 /* UDF 1.5 2.2.9 */
 90 struct SparablePartitionMap
 91 {
 92         Uint8           partitionMapType;       /* 2 */
 93         Uint8           partitionMapLength;     /* 64 */
 94         Uint8           reserved1[2];           /* #00 */
 95         EntityID        partIdent;              /* Flags = 0 */
 96                                                 /* Id = UDF_ID_SPARABLE */
 97                                                 /* IdSuf = 2.1.5.3 */
 98         Uint16          volSeqNum;
 99         Uint16          partitionNum;
100         Uint16          packetLength;           /* 32 */
101         Uint8           numSparingTables;
102         Uint8           reserved2[1];           /* #00 */
103         Uint32          sizeSparingTable;
104         Uint32          locSparingTable[4];
105 };
106  
107 /* DVD Copyright Management Info, see UDF 1.02 3.3.4.5.1.2 */
108 /* when ImpUseExtendedAttr.impIdent= "*UDF DVD CGMS Info" */
109 struct DVDCopyrightImpUse {
110         Uint16 headerChecksum;
111         Uint8  CGMSInfo;
112         Uint8  dataType;
113         Uint8  protectionSystemInfo[4];
114 };
115 
116 /* the impUse of long_ad used in AllocDescs  - UDF 1.02 2.3.10.1 */
117 struct ADImpUse
118 {
119         Uint16 flags;
120         Uint8  impUse[4];
121 };
122 
123 /* UDF 1.02 2.3.10.1 */
124 #define UDF_EXTENT_LENGTH_MASK          0x3FFFFFFF
125 #define UDF_EXTENT_FLAG_MASK            0xc0000000
126 #define UDF_EXTENT_FLAG_ERASED          0x40000000
127 
128 /* 
129  * Important!  VirtualAllocationTables are 
130  * very different between 1.5 and 2.0!
131  */
132 
133 /* ----------- 1.5 ------------- */
134 /* UDF 1.5 2.2.10 */
135 #define FILE_TYPE_VAT15         0x0U
136 
137 /* UDF 1.5 2.2.10 - VAT layout: */
138 struct VirutalAllocationTable15 {
139         Uint32 VirtualSector[0];
140         EntityID        ident;
141         Uint32  previousVATICB;
142    };  
143 /* where number of VirtualSector's is (VATSize-36)/4 */
144 
145 /* ----------- 2.0 ------------- */
146 /* UDF 2.0 2.2.10 */
147 #define FILE_TYPE_VAT20         0xf8U
148 
149 /* UDF 2.0 2.2.10 (different from 1.5!) */
150 struct VirtualAllocationTable20 {
151         Uint16 lengthHeader;
152         Uint16 lengthImpUse;
153         dstring logicalVolIdent[128];
154         Uint32  previousVatICBLoc;
155         Uint32  numFIDSFiles;
156         Uint32  numFIDSDirectories; /* non-parent */
157         Uint16  minReadRevision;
158         Uint16  minWriteRevision;
159         Uint16  maxWriteRevision;
160         Uint16  reserved;
161         Uint8   impUse[0];
162         Uint32  vatEntry[0];
163 };
164 
165 /* Sparing maps, see UDF 1.5 2.2.11 */
166 typedef struct {
167         Uint32  origLocation;
168         Uint32  mappedLocation;
169 } SparingEntry;
170 
171 /* sparing maps, see UDF 2.0 2.2.11 */
172 struct SparingTable {
173         tag     descTag;
174         EntityID sparingIdent; /* *UDF Sparing Table */
175         Uint16   reallocationTableLen;
176         Uint16   reserved;      /* #00 */
177         Uint32   sequenceNum;
178         SparingEntry mapEntry[0];
179 };
180 
181 /* Entity Identifiers (UDF 1.50 6.1) */
182 #define UDF_ID_COMPLIANT        "*OSTA UDF Compliant"
183 #define UDF_ID_LV_INFO          "*UDF LV Info"
184 #define UDF_ID_FREE_EA          "*UDF FreeEASpace"
185 #define UDF_ID_FREE_APP_EA      "*UDF FreeAppEASpace"
186 #define UDF_ID_DVD_CGMS         "*UDF DVD CGMS Info"
187 #define UDF_ID_OS2_EA           "*UDF OS/2 EA"
188 #define UDF_ID_OS2_EA_LENGTH    "*UDF OS/2 EALength"
189 #define UDF_ID_MAC_VOLUME       "*UDF Mac VolumeInfo"
190 #define UDF_ID_MAC_FINDER       "*UDF Mac FinderInfo"
191 #define UDF_ID_MAC_UNIQUE       "*UDF Mac UniqueIDTable"
192 #define UDF_ID_MAC_RESOURCE     "*UDF Mac ResourceFork"
193 #define UDF_ID_VIRTUAL          "*UDF Virtual Partition"
194 #define UDF_ID_SPARABLE         "*UDF Sparable Partition"
195 #define UDF_ID_ALLOC            "*UDF Virtual Alloc Tbl"
196 #define UDF_ID_SPARING          "*UDF Sparing Table"
197 
198 /* Operating System Identifiers (UDF 1.50 6.3) */
199 #define UDF_OS_CLASS_UNDEF      0x00U
200 #define UDF_OS_CLASS_DOS        0x01U
201 #define UDF_OS_CLASS_OS2        0x02U
202 #define UDF_OS_CLASS_MAC        0x03U
203 #define UDF_OS_CLASS_UNIX       0x04U
204 #define UDF_OS_CLASS_WIN95      0x05U
205 #define UDF_OS_CLASS_WINNT      0x06U
206 #define UDF_OS_ID_UNDEF         0x00U
207 #define UDF_OS_ID_DOS           0x00U
208 #define UDF_OS_ID_OS2           0x00U
209 #define UDF_OS_ID_MAC           0x00U
210 #define UDF_OS_ID_UNIX          0x00U
211 #define UDF_OS_ID_WIN95         0x00U
212 #define UDF_OS_ID_WINNT         0x00U
213 #define UDF_OS_ID_AIX           0x01U
214 #define UDF_OS_ID_SOLARIS       0x02U
215 #define UDF_OS_ID_HPUX          0x03U
216 #define UDF_OS_ID_IRIX          0x04U
217 #define UDF_OS_ID_LINUX         0x05U
218 #define UDF_OS_ID_MKLINUX       0x06U
219 #define UDF_OS_ID_FREEBSD       0x07U
220 
221 #define UDF_NAME_PAD    4
222 #define UDF_NAME_LEN    255
223 #define UDF_PATH_LEN    1023
224 
225 #pragma pack()
226 
227 #endif /* !defined(_LINUX_UDF_FMT_H) */
228 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.