firewall.h

来自「Linux下kernel与userspace的通信实现。主要功能为可修改linu」· C头文件 代码 · 共 58 行

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