⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 firewall.h

📁 Linux下对防火墙log的parsing。Linux下调试通过。附带有makefile可供编译。
💻 H
字号:
/* Error codes for parsing */#define ILLEGAL_FILE_NAME 'F'#define ILLEGAL_IP_ADDRESS 'I'#define ILLEGAL_UID 'U'#define ILLEGAL_PORT 'P'#define ILLEGAL_PROGRAM 'R'#define OK '\0'/* List of uids, programs, IP-addresses or ports */struct ElementList {  char *element;  struct ElementList *next;};/* structure for one line of configuration file */struct ConfigLine {  struct ElementList *uids;  struct ElementList *programs;  struct ElementList *IPAddresses;  struct ElementList *ports;};/* structure for one configuration: have only one port */struct ConfigEntry {  struct ElementList *uids;  struct ElementList *programs;  struct ElementList *IPAddresses;  int port;};/* the list of configurations */struct FirewallConfig {  struct ConfigEntry *entry;  struct FirewallConfig *next;};/* parses a string and returns either a configuration entry or a NULL-pointer. In the latter case, errno is set to the appropriate error. */extern struct ConfigLine *parseLine (char *, int *);/* compare two entries. Only port number relevant. Function usable for quicksort */	extern int compareEntry (const void *, const void *);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -