| 1 | /* |
| 2 | * AIDE (Advanced Intrusion Detection Environment) |
| 3 | * |
| 4 | * Copyright (C) 2016,2020,2021,2024,2025 Hannes von Haugwitz |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License as |
| 8 | * published by the Free Software Foundation; either version 2 of the |
| 9 | * License, or (at your option) any later version. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, but |
| 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 14 | * General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License along |
| 17 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 18 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 19 | */ |
| 20 | |
| 21 | #ifndef _FILE_H_INCLUDED |
| 22 | #define _FILE_H_INCLUDEDcxx . . $ `include/file.h:22:9`! |
| 23 | |
| 24 | #include "config.h"cxx . . $ `<file>/include/config.h`/ |
| 25 | #include <sys/stat.h> |
| 26 | #include <limits.h> |
| 27 | |
| 28 | #define FT_TYPEcxx . . $ `include/file.h:28:9`! unsigned int |
| 29 | #define FT_NULLcxx . . $ `include/file.h:29:9`! 0U |
| 30 | |
| 31 | #define FT_REGcxx . . $ `include/file.h:31:9`! (1U<<0) /* file */ |
| 32 | #define FT_DIRcxx . . $ `include/file.h:32:9`! (1U<<1) /* dir */ |
| 33 | #define FT_FIFOcxx . . $ `include/file.h:33:9`! (1U<<2) /* fifo */ |
| 34 | #define FT_LNKcxx . . $ `include/file.h:34:9`! (1U<<3) /* link */ |
| 35 | #define FT_BLKcxx . . $ `include/file.h:35:9`! (1U<<4) /* block device */ |
| 36 | #define FT_CHRcxx . . $ `include/file.h:36:9`! (1U<<5) /* char device */ |
| 37 | #define FT_SOCKcxx . . $ `include/file.h:37:9`! (1U<<6) /* socket */ |
| 38 | #define FT_DOORcxx . . $ `include/file.h:38:9`! (1U<<7) /* door */ |
| 39 | #define FT_PORTcxx . . $ `include/file.h:39:9`! (1U<<8) /* port */ |
| 40 | |
| 41 | char get_f_type_char_from_f_typecxx . . $ get_f_type_char_from_f_type(1cb8f0426fc6e5a2).(FT_TYPEcxx . . $ `include/file.h:28:9`!); |
| 42 | char *get_f_type_string_from_f_typecxx . . $ get_f_type_string_from_f_type(f109d7e0a0ca42b3).(FT_TYPEcxx . . $ `include/file.h:28:9`!); |
| 43 | char get_f_type_char_from_permcxx . . $ get_f_type_char_from_perm(1cb8f0426fc6e5a2).(mode_tcxx . . $ mode_t#); |
| 44 | char *get_f_type_string_from_permcxx . . $ get_f_type_string_from_perm(f109d7e0a0ca42b3).(mode_tcxx . . $ mode_t#); |
| 45 | FT_TYPEcxx . . $ `include/file.h:28:9`! get_f_type_from_charcxx . . $ get_f_type_from_char(f1d64ee6cf94df31).(char); |
| 46 | FT_TYPEcxx . . $ `include/file.h:28:9`! get_f_type_from_permcxx . . $ get_f_type_from_perm(2141b656ce2cc063).(mode_tcxx . . $ mode_t#); |
| 47 | |
| 48 | #ifdef HAVE_FSTYPEcxx . . $ `./include/config.h:53:9`! |
| 49 | #define FS_TYPEcxx . . $ `include/file.h:49:9`! unsigned long |
| 50 | |
| 51 | typedef structcxx . . $ $anonymous_type_865fa0d4a79f80f3_0# { |
| 52 | char *strcxx . . $ $anonymous_type_865fa0d4a79f80f3_0#str.; |
| 53 | unsigned int magiccxx . . $ $anonymous_type_865fa0d4a79f80f3_0#magic.; |
| 54 | } filesystem_tcxx . . $ filesystem_t#; |
| 55 | |
| 56 | FS_TYPEcxx . . $ `include/file.h:49:9`! get_fs_type_from_stringcxx . . $ get_fs_type_from_string(751346f8406fd082).(const char *); |
| 57 | int generate_fs_type_stringcxx . . $ generate_fs_type_string(42a4fda062c6f95b).(FS_TYPEcxx . . $ `include/file.h:49:9`!, char*); |
| 58 | char * get_fs_type_string_from_magiccxx . . $ get_fs_type_string_from_magic(4b58d6ff543a4736).(FS_TYPEcxx . . $ `include/file.h:49:9`!); |
| 59 | |
| 60 | extern filesystem_tcxx . . $ filesystem_t# filesystemscxx . . $ filesystems.[]; |
| 61 | extern int num_filesystemscxx . . $ num_filesystems.; |
| 62 | #endif |
| 63 | |
| 64 | typedef struct file_tcxx . . $ file_t# { |
| 65 | char* namecxx . . $ file_t#name.; |
| 66 | FT_TYPEcxx . . $ `include/file.h:28:9`! typecxx . . $ file_t#type.; |
| 67 | #ifdef HAVE_FSTYPEcxx . . $ `./include/config.h:53:9`! |
| 68 | FS_TYPEcxx . . $ `include/file.h:49:9`! fs_typecxx . . $ file_t#fs_type.; |
| 69 | #endif |
| 70 | } file_tcxx . . $ file_t#; |
| 71 | |
| 72 | #endif |