Macro that takes a file system type and returns 1 if the type is for an APFS "file system".
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for an APFS "file system".
Macro that takes a file system type and returns 1 if the type is for a Btrfs file system.
Referenced by btrfs_open(), and tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a logical directory "file system".
Macro that takes a file system type and returns 1 if the type is for a ExtX file system.
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a FAT file system.
Referenced by TskAutoDb::filterFs(), TskAuto::isFATSystemFiles(), and tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a FFS file system.
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a HFS file system.
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a ISO9660 file system.
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for an NTFS file system.
Referenced by TskAuto::isNtfsSystemFiles(), tsk_fs_open_img_decrypt(), and tsk_fs_path2inum().
Macro that takes a file system type and returns 1 if the type is for a raw "file system".
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a swap "file system".
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a YAFFS2 file system.
Referenced by tsk_fs_open_img_decrypt().
Macro that takes a file system type and returns 1 if the type is for a YAFFS2 file system.
Referenced by tsk_fs_open_img_decrypt().
Flags for the FS_INFO structure.
Enumerator | |
---|---|
TSK_FS_INFO_FLAG_NONE |
No Flags. |
TSK_FS_INFO_FLAG_HAVE_SEQ |
File system has sequence numbers in the inode addresses. |
TSK_FS_INFO_FLAG_HAVE_NANOSEC |
Nano second field in times will be set. |
TSK_FS_INFO_FLAG_ENCRYPTED |
File system is encrypted. |
Values for the file system type.
Each bit corresponds to a file system. The "[fs]_DETECT" value (such as TSK_FS_TYPE_NTSF_DETECT) is the OR of all of the subtypes that it could detect. If there is only one type of that file system, the [fs]_DETECT value will be the same as the type.
The _DETECT values should not be stored in TSK_FS_INFO. Once tsk_fs_open() has detected the type, it should assign the specific version in TSK_FS_INFO.
Enumerator | |
---|---|
TSK_FS_TYPE_DETECT |
Use autodetection methods. |
TSK_FS_TYPE_NTFS |
NTFS file system. |
TSK_FS_TYPE_NTFS_DETECT |
NTFS auto detection. |
TSK_FS_TYPE_FAT12 |
FAT12 file system. |
TSK_FS_TYPE_FAT16 |
FAT16 file system. |
TSK_FS_TYPE_FAT32 |
FAT32 file system. |
TSK_FS_TYPE_EXFAT |
exFAT file system |
TSK_FS_TYPE_FAT_DETECT |
FAT auto detection. |
TSK_FS_TYPE_FFS1 |
UFS1 (FreeBSD, OpenBSD, BSDI ...) |
TSK_FS_TYPE_FFS1B |
UFS1b (Solaris - has no type) |
TSK_FS_TYPE_FFS2 |
UFS2 - FreeBSD, NetBSD. |
TSK_FS_TYPE_FFS_DETECT |
UFS auto detection. |
TSK_FS_TYPE_EXT2 |
Ext2 file system. |
TSK_FS_TYPE_EXT3 |
Ext3 file system. |
TSK_FS_TYPE_EXT_DETECT |
ExtX auto detection. |
TSK_FS_TYPE_SWAP |
SWAP file system. |
TSK_FS_TYPE_SWAP_DETECT |
SWAP auto detection. |
TSK_FS_TYPE_RAW |
RAW file system. |
TSK_FS_TYPE_RAW_DETECT |
RAW auto detection. |
TSK_FS_TYPE_ISO9660 |
ISO9660 file system. |
TSK_FS_TYPE_ISO9660_DETECT |
ISO9660 auto detection. |
TSK_FS_TYPE_HFS |
HFS+/HFSX file system. |
TSK_FS_TYPE_HFS_DETECT |
HFS auto detection. |
TSK_FS_TYPE_EXT4 |
Ext4 file system. |
TSK_FS_TYPE_YAFFS2 |
YAFFS2 file system. |
TSK_FS_TYPE_YAFFS2_DETECT |
YAFFS2 auto detection. |
TSK_FS_TYPE_HFS_LEGACY |
HFS file system. |
TSK_FS_TYPE_APFS |
APFS file system. |
TSK_FS_TYPE_APFS_DETECT |
APFS auto detection. |
TSK_FS_TYPE_LOGICAL |
Logical directory (aut detection not supported) |
TSK_FS_TYPE_BTRFS |
Btrfs file system. |
TSK_FS_TYPE_BTRFS_DETECT |
Btrfs auto detection. |
TSK_FS_TYPE_XFS |
XFS file system. |
TSK_FS_TYPE_XFS_DETECT |
XFS auto detection. |
TSK_FS_TYPE_UNSUPP |
Unsupported file system. |
Read the contents of a given attribute using a typical read() type interface.
0s are returned for missing runs.
References TSK_FS_ATTR_RUN::addr, TSK_FS_ATTR::allocsize, TSK_FS_INFO::block_size, TSK_FS_ATTR::buf, TSK_FS_ATTR_RUN::crypto_id, TSK_FS_ATTR_RUN::flags, TSK_FS_ATTR::flags, TSK_FS_ATTR::fs_file, TSK_FS_FILE::fs_info, TSK_FS_INFO::ftype, TSK_FS_ATTR::initsize, TSK_FS_ATTR_RUN::len, TSK_FS_FILE::meta, TSK_FS_ATTR_RUN::next, TSK_FS_ATTR::nrd, TSK_FS_ATTR_RUN::offset, PRIuSIZE, TSK_FS_ATTR::rd, TSK_FS_ATTR::run, TSK_FS_ATTR::size, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_error_set_errstr2(), TSK_FS_ATTR_COMP, TSK_FS_ATTR_NONRES, TSK_FS_ATTR_RES, TSK_FS_ATTR_RUN_FLAG_FILLER, TSK_FS_ATTR_RUN_FLAG_SPARSE, TSK_FS_FILE_READ_FLAG_SLACK, tsk_fs_read_decrypt(), TSK_FS_TYPE_LOGICAL, and tsk_verbose.
Referenced by TskFsAttribute::read(), tsk_fs_file_read(), and tsk_fs_file_read_type().
Process an attribute and call a callback function with its contents.
The callback will be called with chunks of data that are fs->block_size or less. The address given in the callback will be correct only for raw files (when the raw file contents were stored in the block). For compressed and sparse attributes, the address may be zero.
References TSK_FS_ATTR::flags, TSK_FS_ATTR::fs_file, TSK_FS_FILE::fs_info, TSK_FS_FILE::meta, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), TSK_FS_ATTR_COMP, TSK_FS_ATTR_NONRES, and TSK_FS_ATTR_RES.
Referenced by tsk_fs_file_walk(), tsk_fs_file_walk_type(), and TskFsAttribute::walk().
Free the memory associated with the TSK_FS_BLOCK structure.
References TSK_FS_BLOCK::buf.
Referenced by TskFsBlock::~TskFsBlock().
Get the contents and flags of a specific file system block.
Note that if the block contains compressed data, then this function will return the compressed data with the RAW flag set. The uncompressed data can be obtained only from the file-level functions.
References TSK_FS_BLOCK::addr, TSK_FS_INFO::block_size, TSK_FS_BLOCK::buf, TSK_FS_BLOCK::fs_info, TSK_FS_INFO::img_info, TSK_FS_INFO::last_block_act, TSK_FS_INFO::offset, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), TSK_FS_BLOCK_FLAG_RAW, and tsk_img_read().
Cycle through a range of file system blocks and call the callback function with the contents and allocation status of each.
References TSK_FS_INFO::block_walk, tsk_error_reset(), tsk_error_set_errno(), and tsk_error_set_errstr().
Referenced by TskFsInfo::blockWalk(), and btrfs_open().
Close an open file system.
References TSK_FS_INFO::close.
Referenced by btrfs_open(), TskFsInfo::close(), TskAuto::findFilesInFs(), TskAuto::findFilesInFsRet(), and TskAuto::findFilesInPool().
Close the directory that was opened with tsk_fs_dir_open()
References TSK_FS_DIR::fs_file, TSK_FS_DIR::names, TSK_FS_DIR::names_used, and tsk_fs_file_close().
Referenced by tsk_fs_path2inum().
Return a specific file or subdirectory from an open directory.
References TSK_FS_NAME::flags, TSK_FS_DIR::fs_info, TSK_FS_FILE::meta, TSK_FS_NAME::meta_addr, TSK_FS_NAME::meta_seq, TSK_FS_NAME::name, TSK_FS_FILE::name, TSK_FS_DIR::names, TSK_FS_DIR::names_used, PRIuSIZE, TSK_FS_META::seq, TSK_FS_NAME::shrt_name, tsk_error_print(), tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), TSK_FS_NAME_FLAG_ALLOC, and tsk_verbose.
Referenced by tsk_fs_path2inum().
Return only the name for a file or subdirectory from an open directory.
Useful when wanting to find files of a given name and you don't need the additional metadata.
References TSK_FS_DIR::fs_info, TSK_FS_DIR::names, TSK_FS_DIR::names_used, PRIuSIZE, tsk_error_set_errno(), and tsk_error_set_errstr().
Returns the number of files and subdirectories in a directory.
References TSK_FS_DIR::names_used, tsk_error_set_errno(), and tsk_error_set_errstr().
Referenced by tsk_fs_path2inum().
Open a directory (using its path) so that each of the files in it can be accessed.
References TSK_FS_DIR::fs_file, TSK_FS_FILE::name, tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_dir_open_meta(), and tsk_fs_path2inum().
Open a directory (using its metadata addr) so that each of the files in it can be accessed.
Referenced by tsk_fs_dir_open(), and tsk_fs_path2inum().
Walk the file names in a directory and obtain the details of the files via a callback.
Referenced by fatfs_inode_walk().
Return the default attribute for the file.
References TSK_FS_META::attr, TSK_FS_FILE::fs_info, and TSK_FS_FILE::meta.
Referenced by tsk_fs_file_read(), and tsk_fs_file_walk().
Return a specific attribute by its ID for the file.
References TSK_FS_ATTR::id, tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_file_attr_get_idx(), and tsk_fs_file_attr_getsize().
Get a file's attribute based on the 0-based index in the list (and not type, id pair).
References TSK_FS_META::attr, and TSK_FS_FILE::meta.
Referenced by TskAuto::processAttributes(), tsk_fs_file_attr_get_id(), and tsk_fs_path2inum().
Return a specific type and id attribute for the file.
References TSK_FS_META::attr, and TSK_FS_FILE::meta.
Referenced by fatfs_istat(), tsk_fs_file_read_type(), and tsk_fs_file_walk_type().
Return the number of attributes in the file.
References TSK_FS_META::attr, TSK_FS_FILE::meta, and tsk_error_reset().
Referenced by TskAuto::processAttributes(), TskAutoDb::processFile(), tsk_fs_file_attr_get_id(), and tsk_fs_path2inum().
Close an open file.
References TSK_FS_FILE::meta, and TSK_FS_FILE::name.
Referenced by TskFsFile::close(), fatfs_inode_walk(), fatfs_istat(), TskAutoDb::filterFs(), tsk_fs_dir_close(), tsk_fs_file_open_meta(), tsk_fs_path2inum(), and tsk_ntfs_usnjentry_walk().
Return the handle structure for a specific file, given its full path.
Note that if you have the metadata address fo the file, then tsk_fs_file_open_meta() is a more efficient approach.
References TSK_FS_FILE::meta, TSK_FS_NAME::meta_seq, TSK_FS_FILE::name, TSK_FS_META::seq, tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_file_open_meta(), and tsk_fs_path2inum().
Referenced by TskAutoDb::filterFs(), and TskFsFile::open().
Open a file given its metadata address.
This function loads the metadata and returns a handle that can be used to read and process the file. Note that the returned TSK_FS_FILE structure will not have the file name set because it was not used to load the file and this function does not search the directory structure to find the name that points to the address. In general, if you know the metadata address of a file, this function is more efficient then tsk_fs_file_open, which first maps a file name to the metadata address and then opens the file using this function.
References TSK_FS_FILE::name, tsk_error_set_errno(), tsk_error_set_errstr(), and tsk_fs_file_close().
Referenced by fatfs_istat(), TskFsFile::open(), tsk_fs_file_open(), and tsk_ntfs_usnjopen().
Read the contents of a specific attribute of a file using a typical read() type interface.
0s are returned for missing runs of files.
References TSK_FS_FILE::fs_info, tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_attr_read(), and tsk_fs_file_attr_get().
Referenced by TskFsFile::read().
Read the contents of a specific attribute of a file using a typical read() type interface and be able specify a specific attribute to read (applies only to file systems with multiple attributes per file, such as NTFS).
0s are returned for missing runs of files.
References TSK_FS_FILE::fs_info, TSK_FS_FILE::meta, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_attr_read(), tsk_fs_file_attr_get_type(), and TSK_FS_FILE_READ_FLAG_NOID.
Referenced by TskFsFile::read().
Process a file and call a callback function with the file contents.
The callback will be called with chunks of data that are fs->block_size or less. The address given in the callback will be correct only for raw files (when the raw file contents were stored in the block). For compressed and sparse files, the address may be zero. If a file has multiple attributes, such as NTFS files, this function uses the default one ($DATA for files, $IDX_ROOT for directories). Use tsk_fs_file_walk_type to specify an attribute.
References TSK_FS_META::addr, TSK_FS_FILE::fs_info, TSK_FS_FILE::meta, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fprintf(), tsk_fs_attr_walk(), tsk_fs_file_attr_get(), and tsk_verbose.
Referenced by fatfs_inode_walk(), fatfs_istat(), tsk_fs_file_hash_calc(), and TskFsFile::walk().
Process a specific attribute in a file and call a callback function with the file contents.
The callback will be called with chunks of data that are fs->block_size or less. The address given in the callback will be correct only for raw files (when the raw file contents were stored in the block). For compressed and sparse files, the address may be zero. If the file system you are analyzing does not have multiple attributes per file, then you can use tsk_fs_file_walk(). For incomplete or corrupt files, some missing runs will be identified as SPARSE and zeros will be returned in the content.
References TSK_FS_META::addr, TSK_FS_FILE::fs_info, TSK_FS_FILE::meta, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fprintf(), tsk_fs_attr_walk(), tsk_fs_file_attr_get_type(), TSK_FS_FILE_WALK_FLAG_NOID, and tsk_verbose.
Referenced by TskFsFile::walk().
Copys a summary of the encryption algoritm to a_desc.
Expected size of description is under 100 characters.
Makes the "ls -l" permissions string for a file.
References TSK_FS_META::mode, TSK_FS_META_MODE_IRGRP, TSK_FS_META_MODE_IROTH, TSK_FS_META_MODE_IRUSR, TSK_FS_META_MODE_ISGID, TSK_FS_META_MODE_ISUID, TSK_FS_META_MODE_ISVTX, TSK_FS_META_MODE_IWGRP, TSK_FS_META_MODE_IWOTH, TSK_FS_META_MODE_IWUSR, TSK_FS_META_MODE_IXGRP, TSK_FS_META_MODE_IXOTH, TSK_FS_META_MODE_IXUSR, tsk_fs_meta_type_str, TSK_FS_META_TYPE_STR_MAX, and TSK_FS_META::type.
Referenced by TskFsMeta::getLs().
Walk a range of metadata structures and call a callback for each structure that matches the flags supplied.
For example, it can call the callback on only allocated or unallocated entries.
References TSK_FS_INFO::inode_walk.
Referenced by btrfs_open(), and TskFsInfo::metaWalk().
Tries to process data in a disk image at a given offset as a file system.
Returns a structure that can be used for analysis and reporting.
References tsk_fs_open_img_decrypt().
Referenced by TskAuto::findFilesInPool(), and TskFsInfo::open().
Tries to process data in a disk image at a given offset as a file system.
Allows for providing an optional password for decryption. Returns a structure that can be used for analysis and reporting.
References btrfs_open(), TSK_FS_INFO::close, TSK_IMG_INFO::itype, tsk_error_get_errno(), tsk_error_get_errstr(), tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fprintf(), TSK_FS_TYPE_APFS_DETECT, TSK_FS_TYPE_BTRFS_DETECT, TSK_FS_TYPE_DETECT, TSK_FS_TYPE_EXT_DETECT, TSK_FS_TYPE_FAT_DETECT, TSK_FS_TYPE_FFS_DETECT, TSK_FS_TYPE_HFS_DETECT, TSK_FS_TYPE_ISAPFS, TSK_FS_TYPE_ISBTRFS, TSK_FS_TYPE_ISEXT, TSK_FS_TYPE_ISFAT, TSK_FS_TYPE_ISFFS, TSK_FS_TYPE_ISHFS, TSK_FS_TYPE_ISISO9660, TSK_FS_TYPE_ISNTFS, TSK_FS_TYPE_ISO9660_DETECT, TSK_FS_TYPE_ISRAW, TSK_FS_TYPE_ISSWAP, TSK_FS_TYPE_ISXFS, TSK_FS_TYPE_ISYAFFS2, TSK_FS_TYPE_LOGICAL, TSK_FS_TYPE_NTFS_DETECT, TSK_FS_TYPE_XFS_DETECT, TSK_FS_TYPE_YAFFS2_DETECT, TSK_IMG_TYPE_LOGICAL, and tsk_verbose.
Referenced by TskAuto::findFilesInFs(), TskAuto::findFilesInFsRet(), tsk_fs_open_img(), and tsk_fs_open_vol_decrypt().
Tries to process data in a volume as a file system.
Returns a structure that can be used for analysis and reporting.
References tsk_fs_open_vol_decrypt().
Referenced by TskFsInfo::open().
Tries to process data in a volume as a file system.
Allows for providing an optional password for decryption. Returns a structure that can be used for analysis and reporting.
References TSK_VS_INFO::block_size, TSK_VS_INFO::img_info, TSK_VS_INFO::offset, TSK_VS_PART_INFO::start, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fs_open_img_decrypt(), and TSK_VS_PART_INFO::vs.
Referenced by tsk_fs_open_vol().
Parse a TSK_TCHAR string of an inode, type, and id pair (not all parts need to be there).
This assumes the string is either: INUM, INUM-TYPE, or INUM-TYPE-ID. Return the values in integer form.
References TSK_FS_ATTR_ID_DEFAULT.
Referenced by TskFsInfo::parseINum().
Find the meta data address for a given file name (UTF-8).
The basic idea of the function is to break the given name into its subdirectories and start looking for each (starting in the root directory).
References TSK_FS_NAME::flags, TSK_FS_DIR::fs_file, TSK_FS_INFO::ftype, TSK_FS_FILE::meta, TSK_FS_NAME::meta_addr, TSK_FS_ATTR::name, TSK_FS_NAME::name, TSK_FS_FILE::name, TSK_FS_INFO::root_inum, TSK_FS_NAME::shrt_name, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), tsk_fprintf(), tsk_fs_dir_close(), tsk_fs_dir_get(), tsk_fs_dir_getsize(), tsk_fs_dir_open_meta(), tsk_fs_file_attr_get_idx(), tsk_fs_file_attr_getsize(), tsk_fs_file_close(), TSK_FS_NAME_FLAG_ALLOC, TSK_FS_NAME_TYPE_DIR, TSK_FS_TYPE_ISNTFS, tsk_verbose, TSK_FS_META::type, and TSK_FS_NAME::type.
Referenced by TskFsInfo::path2INum(), tsk_fs_dir_open(), tsk_fs_file_open(), and tsk_fs_ifind_path().
Read arbitrary data from inside of the file system.
References tsk_fs_read_decrypt().
Referenced by TskFsInfo::read().
Read a file system block into a char* buffer.
This is actually a wrapper around the fs_read_random function, but it allows the starting location to be specified as a block address.
References tsk_fs_read_block_decrypt().
Referenced by fatfs_inode_walk(), TskFsInfo::readBlock(), and tsk_fs_blkcat().
Read a file system block into a char* buffer.
This is actually a wrapper around the fs_read_random function, but it allows the starting location to be specified as a block address.
References TSK_FS_INFO::block_post_size, TSK_FS_INFO::block_pre_size, TSK_FS_INFO::block_size, TSK_FS_INFO::flags, TSK_FS_INFO::img_info, TSK_FS_INFO::last_block_act, TSK_FS_INFO::offset, PRIuSIZE, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), TSK_FS_INFO_FLAG_ENCRYPTED, and tsk_img_read().
Referenced by tsk_fs_read_block(), and tsk_fs_read_decrypt().
Read arbitrary data from inside of the file system.
References TSK_FS_INFO::block_post_size, TSK_FS_INFO::block_pre_size, TSK_FS_INFO::block_size, TSK_FS_INFO::flags, TSK_FS_INFO::img_info, TSK_FS_INFO::last_block, TSK_FS_INFO::last_block_act, TSK_FS_INFO::offset, tsk_error_reset(), tsk_error_set_errno(), tsk_error_set_errstr(), TSK_FS_INFO_FLAG_ENCRYPTED, tsk_fs_read_block_decrypt(), and tsk_img_read().
Referenced by tsk_fs_attr_read(), and tsk_fs_read().
Converts a time value to a string representation.
Prints all zero values instead of 1970 if time is 0.
Referenced by fatfs_istat().
Converts a time value to a string representation.
Prints all zero values instead of 1970 if time is 0.
Print the supported file system types to a file handle.
References tsk_fprintf().
Referenced by TskFsInfo::typePrint().
Return the supported file system types.
Referenced by TskFsInfo::typeSupported().
Parse a string with the file system type and return its internal ID.
References tsk_fs_type_toid_utf8().
Referenced by TskFsInfo::typeToId().
Parse a string with the file system type and return its internal ID.
References TSK_FS_TYPE_UNSUPP.
Referenced by tsk_fs_type_toid().
Return the string name of a file system type id.
Referenced by TskFsInfo::typeToName().
Copyright © 2007-2020 Brian Carrier. (carrier -at- sleuthkit -dot- org)
This work is licensed under a
Creative Commons Attribution-Share Alike 3.0 United States License.