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

# img_tools.h

Go to the documentation of this file.

    00001 /*
    00002  * The Sleuth Kit
    00003  *
    00004  * $Date: 2007/04/19 19:01:34 $
    00005  *
    00006  * Brian Carrier [carrier@sleuthkit.org]
    00007  * Copyright (c) 2005 Brian Carrier.  All rights reserved
    00008  */
    00009 #ifndef _IMG_TOOLS_H
    00010 #define _IMG_TOOLS_H
    00011
    00012 #include "aux_tools.h"
    00013
    00014 #include <string.h>
    00015 #include <fcntl.h>
    00016 #include <errno.h>
    00017
    00018
    00024 #ifdef HAVE_UNISTD
    00025 #include <unistd.h>
    00026 #endif
    00027
    00028 #ifdef __cplusplus
    00029 extern "C" {
    00030 #endif
    00031
    00032
    00038     enum TSK_IMG_INFO_TYPE_ENUM {
    00039         TSK_IMG_INFO_TYPE_IMG_MASK =            0xf0,
    00040         TSK_IMG_INFO_TYPE_SUB_MASK =            0x0f,
    00041
    00042         TSK_IMG_INFO_TYPE_UNSUPP        =               0x00,
    00043
    00044         /* RAW */
    00045         TSK_IMG_INFO_TYPE_RAW_TYPE      =       0x10,
    00046         TSK_IMG_INFO_TYPE_RAW_SING      =       0x11,
    00047         TSK_IMG_INFO_TYPE_RAW_SPLIT     =       0x12,
    00048
    00049         /* AFF */
    00050         TSK_IMG_INFO_TYPE_AFF_TYPE      =       0x20,
    00051         TSK_IMG_INFO_TYPE_AFF_AFF               =       0x21,
    00052         TSK_IMG_INFO_TYPE_AFF_AFD               =       0x22,
    00053         TSK_IMG_INFO_TYPE_AFF_AFM               =       0x23,
    00054
    00055         /* EWF */
    00056         TSK_IMG_INFO_TYPE_EWF_TYPE      =       0x30,
    00057         TSK_IMG_INFO_TYPE_EWF_EWF               =       0x31
    00058     };
    00059     typedef enum TSK_IMG_INFO_TYPE_ENUM TSK_IMG_INFO_TYPE_ENUM;
    00060
    00061     typedef struct TSK_IMG_INFO TSK_IMG_INFO;
    00062
    00067     struct TSK_IMG_INFO {
    00068
    00069         TSK_IMG_INFO *next;
    00070         TSK_IMG_INFO_TYPE_ENUM itype;
    00071         OFF_T size;
    00072
    00074          SSIZE_T(*read_random) (TSK_IMG_INFO *, OFF_T, char *, OFF_T,
    00075             OFF_T);
    00076
    00077         OFF_T(*get_size) (TSK_IMG_INFO *);
    00078         void (*close) (TSK_IMG_INFO *);
    00079         void (*imgstat) (TSK_IMG_INFO *, FILE *);
    00080     };
    00081
    00082
    00083     extern TSK_IMG_INFO *tsk_img_open(const TSK_TCHAR *, const int,
    00084         const TSK_TCHAR **);
    00085
    00086
    00087 /********* TYPES *******/
    00088     extern TSK_IMG_INFO_TYPE_ENUM tsk_img_parse_type(const TSK_TCHAR *);
    00089     extern void tsk_img_print_types(FILE *);
    00090     extern char *tsk_img_get_type(TSK_IMG_INFO_TYPE_ENUM);
    00091
    00092
    00093
    00094
    00095 #ifdef __cplusplus
    00096 }
    00097 #endif
    00098 #endif