📄 firewall.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'typedef uint32_t IPAddressByteType;/* structure suitable for the kernel */struct ConfigKernelEntry { char *program; IPAddressByteType IPAddress; int port;}; /* 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 + -