📄 def_iso.h
字号:
/***************************************************************************
** File name : def_iso.h
** Author : x.cheng
** Create date :
**
** Comment:
** head file for iso9660.filesystem
**
** Revisions:
** $Log: def_iso.h,v $
** Revision 1.1 2005/08/14 09:50:23 x.cheng
** add into repositories
**
** Revision 1.1 2005/08/10 16:12:06 x.cheng
** add into repositories
**
**
***************************************************************************/
#ifndef __DEF_ISO_H__
#define __DEF_ISO_H__
#define ISO9660_PRIMARY_VOL_DESCRIPTOR_POSITION 16 //logical block number for...
typedef struct PrimaryVolumeDecriptor_Struct
{
unsigned char ucVolDecriptorType; // 0x01
char szStandardIdentifier[5]; // "CD001"
unsigned char ucVolDecriptorVer; // 0x01
unsigned char ucReserved1; // 0x0
char aucSystemIdentifier[32]; //
char aucVolIdentifier[32]; //
unsigned char aucReserved2[8]; // 0x0...
unsigned long ulVolSpaceSize; // little endian double word
unsigned long ulVolSpaceSize_2; // big endian double word.
unsigned char aucReserved3[32]; // 0x0...
unsigned short uiVolSetSize; // 1 little endian word
unsigned short uiVolSetSize_2; // 1 big endian word
unsigned short ulVolSequenceNumber; // 1 little endian word
unsigned short ulVolSequenceNumber_2; // 1 big endian word
unsigned short ulLogicalBlockSize; // 2048 little endian word
unsigned short ulLogicalBlockSize_2; // 2048 big endian word
unsigned long ulPathTableSize; //little endian double word
unsigned long ulPathTableSize_2; // big endian double word.
//number of first sector in first little endian path table,
//as a little endian double word
unsigned long ulPathTableLocation;
//number of first sector in second little endian path table,
//as a little endian double word, or zero if there is no
//second little endian path table
unsigned long ulPathTableLocationOptional;
unsigned long ulPathTableLocation_2; //as a big endian double word
unsigned long ulPathTableLocationOptional_2; //as a big endian double word
unsigned char aucRootDirectory[34];
unsigned char aucVolSetIdentifier[128];
char szPublisherIdentifier[128];
char szDataPreparerIdentifier[128];
char szApplicationIdentifier[128];
unsigned char aucCopyrightFileIdentifier[128];
unsigned char aucAbstractFileIdentifier[37];
unsigned char aucBibliographicFileIdentifier[37];
unsigned char aucVolCreateDateTime[17];
unsigned char aucVolModifyDateTime[17];
unsigned char aucVolExpireDateTime[17];
unsigned char aucVolEffectDateTime[17];
unsigned char ucFileStructureVer; // 0x01
unsigned char ucReserved4; // 0x0
unsigned char aucApplicationUse[512]; // 0x0, normally
unsigned char aucFutureStandardization[653]; // 0x0
} __attribute__ ((packed)) ts_PrimaryVolumeDescriptor;
////////////////////////////////////////////
//flag in dir entry
// bit value
// ------ ------------------------------------------
// 0 (LS) 0 for a norma1 file, 1 for a hidden file
// 1 0 for a file, 1 for a directory
// 2 0 [1 for an associated file]
// 3 0 [1 for record format specified]
// 4 0 [1 for permissions specified]
// 5 0
// 6 0
// 7 (MS) 0 [1 if not the final record for the file]
#define ISO_HIDDEN 0x01
#define ISO_FOLDER 0x02
#define ISO_ISDIR(ucFlag) ( (ucFlag)&ISO_FOLDER )
#define ISO_ISFILE(ucFlag) ( !((ucFlag)&ISO_FOLDER) )
typedef struct Iso9660DirEntry_Struct
{
unsigned char ucDirEntryLength; //the number of bytes in the record (which must be even)
unsigned char ucXarLenght; // 0x0
//number of the first sector of file data or directory
//(zero for an empty file),
unsigned long ulStartSector; //as a little endian double word
unsigned long ulStartSector_2; //as a big endian double word
//number of bytes of file data or length of directory,
//excluding the extended attribute record
unsigned long ulDataLength; //as a little endian double word
unsigned long ulDataLength_2; //as a big endian double word
unsigned char aucDateTime[7]; //1 number of years since 1900
//1 month, where 1=January, 2=February, etc.
//1 day of month, in the range from 1 to 31
//1 hour, in the range from 0 to 23
//1 minute, in the range from 0 to 59
//1 second, in the range from 0 to 59
// (for DOS this is always an even number)
//1 offset from Greenwich Mean Time, in 15-minute intervals,
// as a twos complement signed number, positive for time
// zones east of Greenwich, and negative for time zones
// west of Greenwich (DOS ignores this field)
unsigned char ucFlag;
unsigned char ucInterLeavedFileSize; // 0
unsigned char ucInterLeavedFileGap; // 0
unsigned short uiVolSequenceNumber; // 1 little endian word
unsigned short uiVolSequenceNumber_2; // 1
unsigned char ucIdentifierLength; //
unsigned char aucFileIdentifier[ 0 ];
} __attribute__ ((packed)) ts_Iso9660DirEntry;
typedef struct Iso9660PathTable_Struct
{
unsigned char ucDirIdentifierLength; //1 for root dir
unsigned char ucXarLength; // 0x0 or true length for extend attribute record.
unsigned short ulDirLocation; //number of the first sector in the directory, little e..
unsigned short uiParentDirNbInPathTable; //0 for root dir
unsigned char aucDirIdentifier[ 0 ];
} __attribute__ ((packed)) ts_Iso9660PathTable;
typedef struct Iso9660SuperInfo_Struct
{
unsigned long ulBlockSize;
unsigned long ulRootDirLocation;
unsigned char *pucBuffer;
unsigned short uiIndex;
} __attribute__ ((packed)) ts_Iso9660SuperInfo;
/*********************************function prototype*************************/
void Iso96Initialize(void);
void Is97Dir( void );
int iIs97Cd( char* szDir );
#endif /* end of __DEF_ISO_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -