Main Page | Data Structures | Directories | File List | Data Fields | Globals

# sun.h

    00001 /*
    00002  * The Sleuth Kit
    00003  *
    00004  * $Date: 2007/04/19 19:01:35 $
    00005  *
    00006  * Brian Carrier [carrier@sleuthkit.org]
    00007  * Copyright (c) 2003-2005 Brian Carrier.  All rights reserved
    00008  *
    00009  *
    00010  */
    00011
    00012 #ifndef _SUN_H
    00013 #define _SUN_H
    00014
    00015 #ifdef __cplusplus
    00016 extern "C" {
    00017 #endif
    00018
    00019     typedef struct {
    00020         uint8_t asciilabel[128];
    00021
    00022         /* VTOC */
    00023         uint8_t version[4];
    00024         uint8_t vol_name[8];
    00025         uint8_t num_parts[2];
    00026
    00027         struct {
    00028             uint8_t type[2];
    00029             uint8_t flag[2];
    00030         } part_meta[8];
    00031
    00032         uint8_t bootinfo[4][3];
    00033         uint8_t reserved0[2];
    00034         uint8_t sanity[4];
    00035         uint8_t reserved1[38];
    00036         uint8_t timestamp[8][4];
    00037         /* End VTOC */
    00038
    00039
    00040         uint8_t write_reinstruct[2];
    00041         uint8_t read_reinstruct[2];
    00042         uint8_t reserved2[154];
    00043         uint8_t rpm[2];
    00044         uint8_t num_ph_cyl[2];
    00045         uint8_t alt_per_cyl[2];
    00046         uint8_t reserved3[4];
    00047         uint8_t interleave[2];
    00048         uint8_t num_cyl[2];
    00049         uint8_t num_alt_cyl[2];
    00050         uint8_t num_head[2];
    00051         uint8_t sec_per_tr[2];
    00052         uint8_t reserved5[4];
    00053
    00054         struct {
    00055             uint8_t start_cyl[4];
    00056             uint8_t size_blk[4];
    00057         } part_layout[8];
    00058
    00059         uint8_t magic[2];
    00060         uint8_t checksum[2];
    00061
    00062     } sun_dlabel_sparc;
    00063
    00064
    00065     typedef struct {
    00066
    00067         /* VTOC */
    00068         uint8_t bootinfo[3][4];
    00069         uint8_t sanity[4];
    00070         uint8_t version[4];
    00071         uint8_t vol_name[8];
    00072         uint8_t sec_size[2];
    00073         uint8_t num_parts[2];
    00074         uint8_t reserved0[40];
    00075
    00076         struct {
    00077             uint8_t type[2];
    00078             uint8_t flag[2];
    00079             uint8_t start_sec[4];
    00080             uint8_t size_sec[4];
    00081         } part[16];
    00082
    00083         uint8_t timestamp[16][4];
    00084         uint8_t asciilabel[128];
    00085         /* END of VTOC */
    00086
    00087         uint8_t num_ph_cyl[4];
    00088         uint8_t num_cyl[4];
    00089         uint8_t num_alt_cyl[2];
    00090         uint8_t cyl_offset[2];
    00091         uint8_t num_head[4];
    00092         uint8_t sec_per_tr[4];
    00093         uint8_t interleave[2];
    00094         uint8_t skew[2];
    00095         uint8_t alt_per_cyl[2];
    00096         uint8_t rpm[2];
    00097         uint8_t write_reinstruct[2];
    00098         uint8_t read_reinstruct[2];
    00099         uint8_t reserved1[8];
    00100         uint8_t reserved2[12];
    00101         uint8_t magic[2];
    00102         uint8_t checksum[2];
    00103
    00104     } sun_dlabel_i386;
    00105
    00106 #define SUN_MAGIC       0xDABE
    00107 #define SUN_SANITY      0x600DDEEE
    00108
    00109 #define SUN_FLAG_UNMNT  0x01
    00110 #define SUN_FLAG_RO             0x10
    00111
    00112 #define SUN_SPARC_PART_SOFFSET  0
    00113 #define SUN_I386_PART_SOFFSET   1
    00114
    00115 #ifdef __cplusplus
    00116 }
    00117 #endif
    00118 #endif