fs_tools_i.h

Go to the documentation of this file.
00001 /*
00002 ** fs_tools
00003 ** The Sleuth Kit 
00004 **
00005 ** Contains random internal definitions needed to compile the 
00006 ** library. 
00007 **
00008 ** $Date: 2007/11/29 02:21:42 $
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 
00026 #ifndef _FS_TOOLS_I_H
00027 #define _FS_TOOLS_I_H
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033     /*
00034      * Internal interface.
00035      */
00036 // Include the external file 
00037 #include "fs_tools.h"
00038 
00039 #include <time.h>
00040 #include <locale.h>
00041 
00042 #if defined (HAVE_UNISTD)
00043 #include <unistd.h>
00044 #endif
00045 
00046 #if !defined (TSK_WIN32)
00047 #include <sys/fcntl.h>
00048 #include <sys/time.h>
00049 #endif
00050 
00051 
00052 
00053 #ifndef NBBY
00054 #define NBBY 8
00055 #endif
00056 
00057 #ifndef isset
00058 #define isset(a,i)      (((uint8_t *)(a))[(i)/NBBY] &  (1<<((i)%NBBY)))
00059 #endif
00060 
00061 #ifndef setbit
00062 #define setbit(a,i)     (((uint8_t *)(a))[(i)/NBBY] |= (1<<((i)%NBBY)))
00063 #endif
00064 
00065 
00066 /* Data structure and action to internally load a file */
00067     typedef struct {
00068         char *base;
00069         char *cur;
00070         size_t total;
00071         size_t left;
00072     } TSK_FS_LOAD_FILE;
00073 
00074     extern uint8_t tsk_fs_load_file_action(TSK_FS_INFO *, DADDR_T, char *,
00075         size_t, TSK_FS_BLOCK_FLAG_ENUM, void *);
00076 
00077 
00078 /* Specific file system routines */
00079     extern TSK_FS_INFO *ext2fs_open(TSK_IMG_INFO *, SSIZE_T,
00080         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00081     extern TSK_FS_INFO *fatfs_open(TSK_IMG_INFO *, SSIZE_T,
00082         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00083     extern TSK_FS_INFO *ffs_open(TSK_IMG_INFO *, SSIZE_T,
00084         TSK_FS_INFO_TYPE_ENUM);
00085     extern TSK_FS_INFO *ntfs_open(TSK_IMG_INFO *, SSIZE_T,
00086         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00087     extern TSK_FS_INFO *rawfs_open(TSK_IMG_INFO *, SSIZE_T);
00088     extern TSK_FS_INFO *swapfs_open(TSK_IMG_INFO *, SSIZE_T);
00089     extern TSK_FS_INFO *iso9660_open(TSK_IMG_INFO *, SSIZE_T,
00090         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00091     extern TSK_FS_INFO *hfs_open(TSK_IMG_INFO *, SSIZE_T,
00092         TSK_FS_INFO_TYPE_ENUM, uint8_t);
00093 
00094 
00095 // Endian macros - actual functions in misc/
00096 
00097 #define tsk_fs_guessu16(fs, x, mag)   \
00098         tsk_guess_end_u16(&(fs->endian), (x), (mag))
00099 
00100 #define tsk_fs_guessu32(fs, x, mag)   \
00101         tsk_guess_end_u32(&(fs->endian), (x), (mag))
00102 
00103 #ifdef __cplusplus
00104 }
00105 #endif
00106 #endif
00107 /* LICENSE
00108  * .ad
00109  * .fi
00110  *      This software is distributed under the IBM Public License.
00111  * AUTHOR(S)
00112  *      Wietse Venema
00113  *      IBM T.J. Watson Research
00114  *      P.O. Box 704
00115  *      Yorktown Heights, NY 10598, USA
00116  --*/

Generated on Wed Nov 28 16:11:15 2007 for The Sleuth Kit (Incomplete) by  doxygen 1.5.1