firewall.h

来自「Linux下对防火墙log的parsing。Linux下调试通过。附带有make」· C头文件 代码 · 共 47 行

H
47
字号
/* 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 + =
减小字号Ctrl + -
显示快捷键?