This commit is contained in:
2025-04-23 11:41:06 +08:00
parent 1e00348e84
commit 1c28d55681
11 changed files with 89 additions and 102 deletions

View File

@@ -18,6 +18,10 @@
#include <sys/types.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
@@ -25,7 +29,7 @@
#include <getopt.h>
#include <string.h>
#define MAXIPSET_ 10240
#define MAXIPSET_ 65535
#define MAXIPLEN 32
#define CACHE_TTL 180 // 设定缓存的存活时间为 600 秒 (10 分钟)
@@ -54,5 +58,6 @@ extern int append_string_to_file(const char *filepath, const char *str);
extern int read_file_to_array(const char *filepath, char cn_ip[MAXIPSET_][MAXIPLEN], int *line_count);
extern int file_exists_access(const char *filepath);
extern int truncate_file(const char *path);
#endif