# dos.h

    00001 /*
    00002  * The Sleuth Kit
    00003  *
    00004  * $Date: 2007/04/19 19:01:34 $
    00005  *
    00006  * Brian Carrier [carrier@sleuthkit.org]
    00007  * Copyright (c) 2003-2005 Brian Carrier.  All rights reserved
    00008  *
    00009  */
    00010 #ifndef _DOS_H
    00011 #define _DOS_H
    00012
    00013 #ifdef __cplusplus
    00014 extern "C" {
    00015 #endif
    00016
    00017     typedef struct {
    00018         uint8_t boot;
    00019         uint8_t start_chs[3];
    00020         uint8_t ptype;
    00021         uint8_t end_chs[3];
    00022         uint8_t start_sec[4];
    00023         uint8_t size_sec[4];
    00024     } dos_part;
    00025
    00026 /* Boot Sector w/partition table */
    00027     typedef struct {
    00028         uint8_t f1[3];
    00029         /* the next three are actually part of NTFS and FAT, but
    00030          * we use them for sanity checks in the detect code */
    00031         char oemname[8];
    00032         uint8_t ssize[2];       /* sector size in bytes */
    00033         uint8_t csize;          /* cluster size in sectors */
    00034         uint8_t filler[432];
    00035         dos_part ptable[4];
    00036         uint8_t magic[2];
    00037     } dos_sect;
    00038
    00039 #define DOS_MAGIC       0xaa55
    00040 #define DOS_PART_SOFFSET 0
    00041
    00042 #ifdef __cplusplus
    00043 }
    00044 #endif
    00045 #endif