00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
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
00029
00030
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
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
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
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
00103
00104
00105
00106
00107
00108
00109
00110
00111