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

fs_tools_i.h

00001 /*
00002 ** fs_tools
00003 ** The Sleuth Kit 
00004 **
00005 ** Contains random internal definitions needed to compile the 
00006 ** library. 
00007 **
00008 ** $Date: 2007/04/05 16:01:55 $
00009 **
00010 ** Brian Carrier [carrier@sleuthkit.org]
00011 ** Copyright (c) 2003-2005 Brian Carrier.  All rights reserved
00012 **
00013 ** TASK
00014 ** Copyright (c) 2002 @stake Inc.  All rights reserved
00015 ** 
00016 ** Copyright (c) 1997,1998,1999, International Business Machines          
00017 ** Corporation and others. All Rights Reserved.
00018 */
00019 
00020 #ifndef _FS_TOOLS_I_H
00021 #define _FS_TOOLS_I_H
00022 
00023 #ifdef __cplusplus
00024 extern "C" {
00025 #endif
00026 
00027     /*
00028      * Internal interface.
00029      */
00030 // Include the external file 
00031 #include "fs_tools.h"
00032 
00033 #include <time.h>
00034 #include <locale.h>
00035 
00036 #if defined (HAVE_UNISTD)
00037 #include <unistd.h>
00038 #endif
00039 
00040 #if !defined (TSK_WIN32)
00041 #include <sys/fcntl.h>
00042 #include <sys/param.h>
00043 #include <sys/time.h>
00044 #endif
00045 
00046 
00047 
00048 #ifndef NBBY
00049 #define NBBY 8
00050 #endif
00051 
00052 #ifndef isset
00053 #define isset(a,i)      (((uint8_t *)(a))[(i)/NBBY] &  (1<<((i)%NBBY)))
00054 #endif
00055 
00056 #ifndef setbit
00057 #define setbit(a,i)     (((uint8_t *)(a))[(i)/NBBY] |= (1<<((i)%NBBY)))
00058 #endif
00059 
00060 
00061 /* Data structure and action to internally load a file */
00062     typedef struct {
00063         char *base;
00064         char *cur;
00065         size_t total;
00066         size_t left;
00067     } TSK_FS_LOAD_FILE;
00068 
00069     extern uint8_t tsk_fs_load_file_action(TSK_FS_INFO *, DADDR_T, char *,
00070         size_t, TSK_FS_BLOCK_FLAG_ENUM, void *);
00071 
00072 
00073 /* Specific file system routines */
00074     extern TSK_FS_INFO *ext2fs_open(TSK_IMG_INFO *, SSIZE_T,
00075         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00076     extern TSK_FS_INFO *fatfs_open(TSK_IMG_INFO *, SSIZE_T,
00077         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00078     extern TSK_FS_INFO *ffs_open(TSK_IMG_INFO *, SSIZE_T,
00079         TSK_FS_INFO_TYPE_ENUM);
00080     extern TSK_FS_INFO *ntfs_open(TSK_IMG_INFO *, SSIZE_T,
00081         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00082     extern TSK_FS_INFO *rawfs_open(TSK_IMG_INFO *, SSIZE_T);
00083     extern TSK_FS_INFO *swapfs_open(TSK_IMG_INFO *, SSIZE_T);
00084     extern TSK_FS_INFO *iso9660_open(TSK_IMG_INFO *, SSIZE_T,
00085         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00086     extern TSK_FS_INFO *hfs_open(TSK_IMG_INFO *, SSIZE_T,
00087         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00088 
00089 
00090 // Endian macros - actual functions in misc/
00091 
00092 #define tsk_fs_guessu16(fs, x, mag)   \
00093         tsk_guess_end_u16(&(fs->endian), (x), (mag))
00094 
00095 #define tsk_fs_guessu32(fs, x, mag)   \
00096         tsk_guess_end_u32(&(fs->endian), (x), (mag))
00097 
00098 #ifdef __cplusplus
00099 }
00100 #endif
00101 #endif
00102 /* LICENSE
00103  * .ad
00104  * .fi
00105  *      This software is distributed under the IBM Public License.
00106  * AUTHOR(S)
00107  *      Wietse Venema
00108  *      IBM T.J. Watson Research
00109  *      P.O. Box 704
00110  *      Yorktown Heights, NY 10598, USA
00111  --*/

Generated on Thu Apr 5 12:00:08 2007 for The Sleuth Kit (Incomplete) by  doxygen 1.4.2