# split.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) 2005 Brian Carrier.  All rights reserved
    00008  */
    00009
    00010 #ifndef _SPLIT_H
    00011 #define _SPLIT_H
    00012
    00013 #ifdef __cplusplus
    00014 extern "C" {
    00015 #endif
    00016
    00017     extern TSK_IMG_INFO *split_open(int, const TSK_TCHAR **,
    00018         TSK_IMG_INFO *);
    00019
    00020 #define SPLIT_CACHE     15
    00021
    00022     typedef struct {
    00023 #ifdef TSK_WIN32
    00024         HANDLE fd;
    00025 #else
    00026         int fd;
    00027 #endif
    00028         int image;
    00029         OFF_T seek_pos;
    00030     } IMG_SPLIT_CACHE;
    00031
    00032     typedef struct IMG_SPLIT_INFO IMG_SPLIT_INFO;
    00033
    00034     struct IMG_SPLIT_INFO {
    00035         TSK_IMG_INFO img_info;
    00036         int num_img;
    00037         const TSK_TCHAR **images;
    00038         OFF_T *max_off;
    00039         int *cptr;              /* exists for each image - points to entry in cache */
    00040         IMG_SPLIT_CACHE cache[SPLIT_CACHE];     /* small number of fds for open images */
    00041         int next_slot;
    00042     };
    00043
    00044 #ifdef __cplusplus
    00045 }
    00046 #endif
    00047 #endif