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

📄 tsk_iso9660.h

📁 linux下开发的针对所有磁盘的数据恢复的源码
💻 H
📖 第 1 页 / 共 2 页
字号:
    unsigned char app_id[ISODCL(575, 702)];     /* application identifier */    unsigned char copy_id[ISODCL(703, 739)];    /* copyright file identifier */    unsigned char abs_id[ISODCL(740, 776)];     /* abstract file identifier */    unsigned char bib_id[ISODCL(777, 813)];     /* bibliographic file identifier */    date_time make_date;        /* volume creation date/time */    date_time mod_date;         /* volume modification date/time */    date_time exp_date;         /* volume expiration date/time */    date_time ef_date;          /* volume effective date/time */    char fs_ver[ISODCL(882, 882)];      /* file structure version */    char res[ISODCL(883, 883)]; /* reserved */    char app_use[ISODCL(884, 1395)];    /* application use */    char reserv[ISODCL(1396, 2048)];    /* reserved */} iso9660_svd;/* iso 9660 boot record */typedef struct {    char boot_sys_id[ISODCL(8, 39)];    /* boot system identifier */    char boot_id[ISODCL(40, 71)];       /* boot identifier */    char system_use[ISODCL(72, 2048)];  /* system use */} iso_bootrec;/* path table record */typedef struct {    uint8_t len_di;             /* length of directory identifier */    uint8_t attr_len;           /* extended attribute record length */    uint8_t ext_loc[4];         /* location of extent */    uint8_t par_dir[2];         /* parent directory number */} path_table_rec;/* extended attribute record */typedef struct {    uint8_t uid[ISODCL(1, 4)];  /* owner identification */    uint8_t gid[ISODCL(5, 8)];  /* group identification */    uint8_t mode[ISODCL(9, 10)];        /* permissions */    uint8_t cre[ISODCL(11, 27)];        /* file creation date/time */    uint8_t mod[ISODCL(28, 44)];        /* file modification d/t */    uint8_t exp[ISODCL(45, 61)];        /* file expiration d/t */    uint8_t eff[ISODCL(62, 78)];        /* file effective d/t */    uint8_t fmt[ISODCL(79, 79)];        /* record format */    uint8_t attr[ISODCL(80, 80)];       /* record attributes */    uint8_t len[ISODCL(81, 84)];        /* record length */    uint8_t sys_id[ISODCL(85, 116)];    /* system identifier */    uint8_t uns[ISODCL(117, 180)];      /* system use, not specified */    uint8_t e_ver[ISODCL(181, 181)];    /* extended attribute record version */    uint8_t len_esc[ISODCL(182, 182)];  /* length of escape sequences */} ext_attr_rec;#define ISO_EA_IRSYS    0x0001#define ISO_EA_IWSYS    0x0002#define ISO_EA_IXSYS    0x0004#define ISO_EA_IRUSR    0x0010#define ISO_EA_IWUSR    0x0020#define ISO_EA_IXUSR    0x0040#define ISO_EA_IRGRP    0x0100#define ISO_EA_IWGRP    0x0200#define ISO_EA_IXGRP    0x0400#define ISO_EA_IROTH    0x1000#define ISO_EA_IWOTH    0x2000#define ISO_EA_IXOTH    0x4000/* primary volume descriptor linked list node */typedef struct iso9660_pvd_node {    iso9660_pvd pvd;    struct iso9660_pvd_node *next;} iso9660_pvd_node;/* supplementary volume descriptor linked list node */typedef struct iso9660_svd_node {    iso9660_svd svd;    struct iso9660_svd_node *next;} iso9660_svd_node;/* RockRidge extension info */typedef struct {    TSK_UID_T uid /* owner */ ;    TSK_GID_T gid;              /* group */    uint16_t mode;              /* posix file mode */    uint32_t nlink;             /* number of links */    char fn[ISO9660_MAXNAMLEN_STD];     /* alternate filename */} rockridge_ext;/** \internal * Internally used structure to hold basic inode information. * */typedef struct {    iso9660_dentry dr;          /* directory record */    ext_attr_rec *ea;           /* extended attribute record */    char fn[ISO9660_MAXNAMLEN + 1];     /* file name */    rockridge_ext *rr;          /* RockRidge Extensions */    int version;    TSK_OFF_T susp_off;         ///< Byte offset in image of SUSP (or NULL)    TSK_OFF_T susp_len;         ///< Length in bytes of SUSP} iso9660_inode;/* inode linked list node */typedef struct iso9660_inode_node {    iso9660_inode inode;    TSK_OFF_T offset;           /* byte offset of inode into disk */    TSK_INUM_T inum;            /* identifier of inode */    int size;                   /* kludge: used to flag fifos, etc */    int ea_size;                /* length of ext attributes */    struct iso9660_inode_node *next;} iso9660_inode_node;/* The all important ISO_INFO struct */typedef struct {    TSK_FS_INFO fs_info;        /* SUPER CLASS */    TSK_INUM_T dinum;           /* cached inode number */    iso9660_inode *dinode;      /* cached disk inode */    uint32_t path_tab_addr;     /* address of path table */    uint32_t root_addr;         /* address of root dir extent */    iso9660_pvd_node *pvd;      ///< Head of primary volume descriptor list (there should be only one...)    iso9660_svd_node *svd;      ///< Head of secondary volume descriptor list     iso9660_inode_node *in_list;        /* list of inodes */    uint8_t rr_found;           /* 1 if rockridge found */} ISO_INFO;extern TSK_RETVAL_ENUM iso9660_dir_open_meta(TSK_FS_INFO * a_fs,    TSK_FS_DIR ** a_fs_dir, TSK_INUM_T a_addr);extern uint8_t iso9660_dinode_load(ISO_INFO * iso, TSK_INUM_T inum);/********************************************************** * * RockRidge Extensions * **********************************************************/typedef struct {    char sig[2];    uint8_t len;    char ver;} iso9660_susp_head;/**  \internal * SUSP Continuation Entry (CE) */typedef struct {    char sig[2];    uint8_t len;    char ver;    uint8_t blk_l[4];           ///< Block location of continuation area    uint8_t blk_m[4];    uint8_t offset_l[4];        ///< Offset to start of continuation area (in bytes)    uint8_t offset_m[4];    uint8_t celen_l[4];         ///< Length of continuation area (in bytes)    uint8_t celen_m[4];} iso9660_susp_ce;/**  \internal * SUSP SP entry */typedef struct {    char sig[2];    uint8_t len;    char ver;    uint8_t chk[2];    uint8_t skip;} iso9660_susp_sp;typedef struct {    char sig[2];    uint8_t len;    char ver;    uint8_t len_id;             ///< length of extension id (in bytes)    uint8_t len_des;            ///< length of extension desc (in bytes)    uint8_t len_src;            ///< Length of extension spec source (in bytes)    uint8_t ext_ver;            ///< Version id     char ext_id[1];             ///< Extension ID text (with length of len_id);    // next is the extension descriptor text    // next is the extension source text} iso9660_susp_er;/* Rockridge ISO9660 system use field entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "RR" */    uint8_t len[ISODCL(3, 3)];  /* length of system use entry */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version */    uint8_t foo[ISODCL(5, 5)];  /* foo */} rr_sys_use;/* Rockridge PX entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "PX" */    uint8_t len;                /* length, should be 44 */    uint8_t ver;                /* system use entry version (1) */    uint8_t mode_l[ISODCL(5, 8)];       /* POSIX file mode - le */    uint8_t mode_m[ISODCL(9, 12)];      /* POSIX file mode - be */    uint8_t links_l[ISODCL(13, 16)];    /* POSIX file links - le */    uint8_t links_m[ISODCL(17, 20)];    /* POSIX file links - be */    uint8_t uid_l[ISODCL(21, 24)];      /* POSIX user id - le */    uint8_t uid_m[ISODCL(25, 28)];      /* POSIX user id - be */    uint8_t gid_l[ISODCL(29, 32)];      /* POSIX group id - le */    uint8_t gid_m[ISODCL(23, 36)];      /* POSIX group id - be */    /* rockridge docs say this is here, k3b disagrees... hmmmm */    //      uint8_t serial[ISODCL(37,44)];  /* POSIX file serial number */} iso9660_rr_px_entry;/* Rockridge PN entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "PN" */    uint8_t len;                /* length, should be 20 */    uint8_t ver;                /* system use entry version (1) */    uint8_t dev_h_l[ISODCL(5, 8)];      /* top 32 bits of device # */    uint8_t dev_h_m[ISODCL(9, 12)];     /* top 32 bits of device # */    uint8_t dev_l_l[ISODCL(13, 16)];    /* low 32 bits of device # */    uint8_t dev_l_m[ISODCL(17, 20)];    /* low 32 bits of device # */} iso9660_rr_pn_entry;/* Rockridge SL entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "SL" */    uint8_t len;                /* length */    uint8_t ver;                /* system use entry version (1) */    uint8_t flags;              /* flags */} iso9660_rr_sl_entry;/* Rockridge NM entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "NM" */    uint8_t len;                /* length of alternate name */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version (1) */    uint8_t flags[ISODCL(5, 5)];        /* flags */    char name[1];               // start of the name} iso9660_rr_nm_entry;/* Rockridge CL entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "CL" */    uint8_t len[ISODCL(3, 3)];  /* length, should be 12 */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version (1) */    uint8_t par_loc[ISODCL(5, 12)];     /* location of parent directory */} iso9660_rr_cl_entry;/* Rockridge RE entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "RE" */    uint8_t len[ISODCL(3, 3)];  /* length, should be 4 */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version (1) */} iso9660_rr_re_entry;/* Rockridge TF entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "TF" */    uint8_t len[ISODCL(3, 3)];  /* length of TF entry */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version (1) */    uint8_t flags[ISODCL(5, 5)];        /* flags */} iso9660_rr_tf_entry;/* Rockridge SF entry */typedef struct {    char sig[ISODCL(1, 2)];     /* signature, should be "SF" */    uint8_t len[ISODCL(3, 3)];  /* length, should be 21 */    uint8_t ver[ISODCL(4, 4)];  /* system use entry version (1) */    uint8_t vfs_h[ISODCL(5, 12)];       /* virtual file size high */    uint8_t vfs_l[ISODCL(13, 20)];      /* virtual file size low */    uint8_t depth[ISODCL(21, 21)];      /* table depth */} iso9660_rr_sf_entry;#endif

⌨️ 快捷键说明

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