⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 udf_types.h

📁 本程序为ST公司开发的源代码
💻 H
📖 第 1 页 / 共 2 页
字号:
typedef struct _UDF_ShortAD{	uint32	extLength;		//0-3	uint32	extPosition;	//4-7} UDF_ShortAD;/* Long Allocation Descriptor *//* This structure is as defined by the ECMA 167 specifications *///14.14.2, pp.116 (udf260, 2.3.10.1, pp.66)typedef __packed struct _UDF_LongAD{	uint32			extLength;		//0-3	UDF_LbAddr		extLocation;	//4-9	uint8			implUse[6];		//10-15} UDF_LongAD;/* Extended Allocation Descriptor *//* This structure is as defined by the ECMA 167 specifications *///14.14.3, pp.117typedef __packed struct _UDF_ExtAD{	uint32			extLength;		//0-3	uint32			recLength;		//4-7	uint32			infLength;		//8-11	UDF_LbAddr		extLocation;	//12-17	uint8			implUse[2];		//18-19} UDF_ExtAD;/* This structure is as defined by the ECMA 167 specifications */ // 2.1.4, pp.19; ECMA 167 1/7.3typedef struct _UDF_TimeStamp {	uint16	TypeAndTimezone;		//0-1	int16	Year;					//2-3	uint8	Month;					//4	uint8	Day;					//5	uint8	Hour;					//6	uint8	Minute;					//7	uint8	Second;					//8	uint8	Centiseconds;			//9	uint8	HundredsofMicroseconds;	//10	uint8	Microseconds;			//11} UDF_TimeStamp;/* Logical Volume Integrity Descriptor *//* This structure is as defined by the ECMA 167 specifications *///2.2.6, pp.32typedef struct _UDF_LogVolIntegrityDesc_i{	/* incomplete LVID */	UDF_Tag			descTag;					//0-15	(Tag=9)	UDF_TimeStamp	recordingDateAndTime;		//16-27	uint32			integrityType;				//28-31	UDF_ExtentAd	nextIntegrityExt;			//32-39	uint8			logicalVolContentsUse[32];	//40-71	uint32			numOfPartitions;			//72-75	(=N_P)	uint32			lengthOfImplUse;			//76-79 (=L_IU)/*	uint32		freeSpaceTable[numOfPartitions];	//80-	uint32		sizeTable[numOfPartitions]; 	 	//80+4*N_P-	uint8		implUse[lengthOfImplUse];		 	//80+8*N_P-*/} UDF_LogVolIntegrityDesc_i;/* Virtual Partition Map *//* This structure is as defined by the ECMA 167 specifications *///2.2.8, pp.37typedef	struct _UDF_VirtualPartitionMap{	uint8			partitionMapType;	//0		=2	uint8			partitionMapLength;	//1		=64	uint8			reserved1[2];		//2-3	=#00	UDF_EntityID	partitionIdent;		//4-35	uint16			volSequenceNum;		//36-37	uint16			partitionNumber;	//38-39	uint8			reserved2[24];		//40-63	=#00} UDF_VirtualPartitionMap;/* VAT *//* This structure is as defined by the udf260 specifications *///2.2.11, pp.35typedef struct _UDF_VAT_i{	/* incomplete Sparing Table */	uint16			lengthOfHeader;				//0-1	(=L_HD)	uint16			lengthOfImplUse;			//2-3	(=L_IU)	uint8			logVolIdentifier[128];		//4-131	uint32			prevVatIcbLoc;				//132-135	uint32			numOfFiles;					//136-139	uint32			numOfDirectories;			//140-143	uint16			minUdfReadRev;				//144-145	uint16			minUdfWriteRev;				//146-147	uint16			maxUdfWriteRev;				//148-149	uint8			reserved[2];				//150-151/*	uint8			implUse[lengthOfImplUse]		//152-	UDF_VatEntry	vatEntry[<information length>]	//152+L_IU-*/} UDF_VAT_i;typedef uint32 UDF_VatEntry;#define VAT_ENTRY_SIZE	sizeof(UDF_VatEntry)/* Sparable Partition Map *//* This structure is as defined by the ECMA 167 specifications *///2.2.9, p.38typedef struct _UDF_SparablePartitionMap{	uint8			partitionMapType;	//0	uint8			partitionMapLength;	//1	uint8			reserved1[2];		//2-3	UDF_EntityID	partIdent;			//4-35	uint16			volSequenceNum;		//36-37	uint16			partitionNumber;	//38-39	uint16			packetLength;		//40-41	uint8			numSparingTables;	//42	(=N_ST)	uint8			reserved[1];		//43	uint32			sizeSparingTable;	//44-47	uint32			locations[4];		//48-63} UDF_SparablePartitionMap;/* Sparing Table layout *//* This structure is as defined by the udf260 specifications *///2.2.12, pp.36typedef struct _UDF_SparingTable_i{	/* incomplete Sparing Table */	UDF_Tag			descTag;					//0-15	(Tag=0)	UDF_EntityID	sparingIdentif;				//16-47	uint16			reallocTableLength;			//48-49	(=RT_L)	uint8			reserved[2];				//50-51 (#00)	uint32			sequenceNum;				//52-55/*	UDF_MapEntry	mapEntry[RT_L];				//56-*/} UDF_SparingTable_i;/* Map Entry description */typedef struct _UDF_MapEntry{	uint32			originalLocation;			//0-3	uint32			mappedLocation;				//4-7} UDF_MapEntry;/* Metadata Partition Map *//* This structure is as defined by the ECMA 167 specifications *///2.2.10, pp.38typedef	struct _UDF_MetadataPartitionMap{	uint8			partitionMapType;	//0		=2	uint8			partitionMapLength;	//1		=64	uint8			reserved1[2];		//2-3	=#00	UDF_EntityID	partitionIdent;		//4-35	uint16			volSequenceNum;		//36-37	uint16			partitionNumber;	//38-39	uint32			metaFileLocation;	//40-43	uint32			metaMirrorFileLoc;	//44-47	uint32			metaBimapFileLoc;	//48-51	uint32			allocationUnitSize;	//52-55	uint16			alignmentUnitSize;	//56-57	uint8			flags;				//58	uint8			reserved2[5];		//59-63	=#00} UDF_MetadataPartitionMap;/* Generic Partition Map *//* This structure is as defined by the ECMA 167 specifications */typedef union _UDF_PartitionMap{	struct 	{		uint8		partitionMapType;	//0		uint8		partitionMapLength;	//1		//uint8		partitionMapping[]	//not implemented	} Generic;/* Type1 Partition Map *///ECMA10.7.2, pp.59	struct	{		uint8	partitionMapType;		//0		=1		uint8	partitionMapLength;		//1		=6		uint16	volSequenceNum;			//2-3		uint16	partitiontNum;			//4-5	} Type1;	struct	{		uint8	partitionMapType;		//0		=2		uint8	partitionMapLength;		//1		=64		uint8	partitionIdent[62];		//2-63	} Type2;	UDF_VirtualPartitionMap		VPM;	//0-63	UDF_SparablePartitionMap	SPM;	//0-63	UDF_MetadataPartitionMap	MPM;	//0-63} UDF_PartitionMap;/* File set Descriptor *//* This structure is as defined by the ECMA 167 specifications *///2.3.2, pp.54typedef struct _UDF_FileSetDesc{	UDF_Tag			descTag;				//0-15	(Tag=256)	UDF_TimeStamp	recordingDateAndTime;	//16-27	uint16			interchangeLvl;			//28-29	uint16			maxInterchangeLvl;		//30-31	uint32			charSetList;			//32-35	uint32			maxCharSetList;			//36-39	uint32			fileSetNum;				//40-43	uint32			fileSetDescNum;			//44-47	UDF_CharSpec	logicalVolIdentCharSet;	//48-111	uint8			logicalVolIdent[128];	//112-239	UDF_CharSpec	fileSetCharSet;			//240-303	uint8			fileSetIdent[32];		//304-335	uint8			copyrightFileIdent[32];	//336-367	uint8			abstractFileIdent[32];	//368-399	UDF_LongAD		rootDirectoryICB;		//400-415	UDF_EntityID	domainIdent;			//416-447	UDF_LongAD		nextExt;				//448-463	UDF_LongAD		streamDirectoryICB;		//464-479	uint8			reserved[32];			//480-511} UDF_FilesetDesc;/* ICB *//* This structure is as defined by the ECMA 167 specifications *///2.3.5, pp.60; 3.3.2, pp.73typedef struct _UDF_IcbTag{	uint32			priorRecordedNumDirectEntries;	//0-3	uint16			strategyType;					//4-5	uint8			strategyParameter[2];			//6-7	//[LL]	uint16			numEntries;						//8-9	uint8			reserved;						//10	=#00	uint8			fileType;						//11	UDF_LbAddr		parentICBLocation;				//12-17	uint16			flags;							//18-19} UDF_IcbTag;/* File Entry *//* This structure is as defined by the ECMA 167 specifications *///14.9, pp.97 (udf260, 2.3.6, pp.62, 3.3.3, pp.75)typedef struct _UDF_FileEntry_i{	/* incomplete File Entry */	UDF_Tag			descTag;					//0-15	(Tag=261)	UDF_IcbTag		icbTag;						//16-35	uint32			uid;						//36-39	uint32			gid;						//40-43	uint32			permissions;				//44-47	uint16			fileLinkCount;				//48-49	uint8			recordFormat;				//50	uint8			recordDisplayAttr;			//51	uint32			recordLength;				//52-55	uint32			informationLength[2];		//This should be a 64 bit value	uint32			logicalBlocksRecorded[2];	//This should be a 64 bit value	UDF_TimeStamp	accessTime;					//72-83	UDF_TimeStamp	modificationTime;			//84-95	UDF_TimeStamp	attrTime;					//96-107	uint32			checkpoint;					//108-111	UDF_LongAD		extendedAttrICB;			//112-127	UDF_EntityID	impIdent;					//128-159	uint32			uniqueID[2];				//This should be a 64 bit value	uint32			lengthExtendedAttr;			//168-171	(=L_EA)	uint32			lengthAllocDescs;			//172-175	(=L_AD)/*	uint8			extendedAttr[L_EA];			//176-	uint8			allocDescs[L_AD];			//176+L_EA-*/	} UDF_FileEntry_i;//[LL]/* Extended File Entry *//* This structure is as defined by the ECMA 167 specifications *///14.17, pp.120// TBD/* These are the parameters that are required across the various functions *//* File Characteristics */// 14.4.3, pp.92 ECMAtypedef enum _UDF_FileCharact{	UDF_FILE_EXISTENCE_INSIGNIFICANCE = (1<<0),	UDF_FILE_IS_DIRECTORY = (1<<1),	UDF_FILE_DELETED = (1<<2),	UDF_FILE_PARENT = (1<<3),	UDF_FILE_METADATA = (1<<4),} UDF_FileCharact;/* File Type */// 14.6.6, pp.95 ECMAtypedef enum _UDF_ICBFileType{	UDF_NOT_HERE,	UDF_UNALLOC_SPACE_ENTRY,	UDF_PARTIT_INTEGR_ENTRY,	UDF_INDIRECT_ENTRY,	UDF_DIRECTORY	/* TBD */} UDF_ICBFileType;/* File Identifier Descriptor *//* This structure is as defined by the ECMA 167 specifications *///2.3.4, pp.57;typedef struct _UDF_fileIdentDesc_i{	/* incomplete FID */	UDF_Tag		descTag;				//0-15	(Tag=257)	uint16		fileVersionNum;			//16-17	uint8		fileCharacteristics;	//18	uint8		lengthFileIdent;		//19	(=L_FI)	UDF_LongAD	icb;					//20-35	uint16		lengthOfImplUse;		//36-37	(=L_IU)/*	uint8		implUse[L_IU];			//38-	uint8		fileIdentifier[L_FI];	//38+L_IU-	uint8		padding[];				//38+L_IU+L_FI-*/} UDF_fileIdentDesc_i;/* Extended Allocation Descriptor *//* This structure is as defined by the ECMA 167 specifications *//* 14.14.3, pp.117 */typedef struct _UDF_extAllocDesc{	uint32		extLength;			//0-3	uint32		recordedLength;		//4-7	uint32		informationLength;	//8-11	UDF_LbAddr	extLocation;		//12-17	uint8		implUse[2];			//18-19} UDF_extAllocDesc;/* recordset storing subdir informations FileEntry and FID */typedef struct _VAT_struct{	uint16		NumberOfDescriptors;	UDF_ShortAD VATAllocationDescriptorsTable[UDF_MAX_NUMBER_OF_DESCRIPTORS];	uint32		VATEntryBeginningIndex;	/* 1st VAT entry number in actually read extent */	uint8		DescriptorIndex;		/* number of row in VATAllocationDescriptorsTable */	uint32		noOfEntries;	UDF_ALLOC_DESC_FLAG	flags;}  VAT_struct;typedef struct{	UDF_ExtentAd	MainVol;	UDF_ExtentAd	ReserveVol;	uint32	start_LBN;			/* block address of last session */	uint32	end_LBN;			/* Last recorded block on the media */	uint32 	packetLength;		/* Packet length to spare */	uint32	sizeSparingTable;	/* Size of each sparing table */	uint32	locSparingTable[UDF_MAX_SPARING_TABLES];								/* Locations of each sparing table */	uint32	partitionLoc[2];	/* Start address of partition or multiple partitions */								/* in this implementation there can be 0 or 2 location */   								//there can be max 2 partition descriptors, as written in udf260 p.15 partition descriptor	URESULT	flag;				/* Indicates presence of VAT of Sparing */																/* 0 -> no table, 1 -> Sparing Table,								 * 2 -> VAT 1.5, 3 -> VAT 2.0 */ 	uint16	curVATSparingInBuf;	/* Flag specifying the current VAT or sparing								 * table that is loaded into buffer */		uint16	fixedVariableFlag;	/* Used to indicate whether the media is */								/* Fixed packet written media or Variable */								/* packet written media */				uint8*	pVATSparingBuf;	uint8*			pBuffer;	UDF_Partition	partitionInfo;	VAT_struct*		pVAT_struct;	char			VolumeName[VOLUME_IDENTIFIER_LENGTH];} PRIVATE_DATA_UDF;typedef enum {	UDF_ANCHOR_FIRST,	UDF_ANCHOR_FIRST_BACKUP_SESS_OPEN,	UDF_ANCHOR_FIRST_BACKUP_SESS_CLOSED,	UDF_ANCHOR_SECOND,	UDF_ANCHOR_NUMBER} UDF_ANCHOR_POSITIONS;/* End of structure definitions */#endif //_UDF_TYPES_H_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -