#include "config.h"#include <sys/param.h>#include <sys/types.h>#include <sys/ioctl.h>#include <sys/socket.h>#include <net/if.h>#include <netinet/in.h>#include <netinet/ip_compat.h>#include <netinet/ip_fil.h>#include <assert.h>#include <errno.h>#include <fcntl.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "dnet.h"Go to the source code of this file.
Classes | |
| struct | fw_handle |
Defines | |
| #define | _NETINET_IP6_H_ |
| #define | ip_t ipf_ip_t |
| #define | KMEM_NAME "/dev/kmem" |
| #define | fi_saddr fi_src.s_addr |
| #define | fi_daddr fi_dst.s_addr |
Functions | |
| static void | rule_to_ipf (const struct fw_rule *rule, struct frentry *fr) |
| static void | ipf_ports_to_rule (uint8_t cmp, uint16_t port, uint16_t top, uint16_t *range) |
| static void | ipf_to_rule (const struct frentry *fr, struct fw_rule *rule) |
| fw_t * | fw_open (void) |
| int | fw_add (fw_t *fw, const struct fw_rule *rule) |
| int | fw_delete (fw_t *fw, const struct fw_rule *rule) |
| static int | fw_kcopy (fw_t *fw, u_char *buf, off_t pos, size_t n) |
| int | fw_loop (fw_t *fw, fw_handler callback, void *arg) |
| fw_t * | fw_close (fw_t *fw) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 37 of file fw-ipf.c. Referenced by fw_open(). |
|
||||||||||||
|
Definition at line 194 of file fw-ipf.c. References NULL, and rule_to_ipf(). |
|
|
Definition at line 271 of file fw-ipf.c. References NULL. |
|
||||||||||||
|
Definition at line 206 of file fw-ipf.c. References NULL, and rule_to_ipf(). |
|
||||||||||||||||||||
|
Definition at line 218 of file fw-ipf.c. References lseek. Referenced by fw_loop(). |
|
||||||||||||||||
|
Definition at line 235 of file fw-ipf.c. References fw_handle::fd, fw_kcopy(), ipf_to_rule(), memset, and NULL. |
|
|
Definition at line 179 of file fw-ipf.c. References fw_close(), KMEM_NAME, and NULL. |
|
||||||||||||||||||||
|
Definition at line 103 of file fw-ipf.c. References TCP_PORT_MAX. Referenced by ipf_to_rule(). |
|
||||||||||||
|
Definition at line 144 of file fw-ipf.c. References addr_mtob(), ADDR_TYPE_IP, FW_DIR_IN, FW_DIR_OUT, FW_OP_ALLOW, FW_OP_BLOCK, IP_ADDR_LEN, ipf_ports_to_rule(), memset, and strlcpy. Referenced by fw_loop(). |
|
||||||||||||
|
Definition at line 52 of file fw-ipf.c. References addr::addr_bits, addr_btom(), fw_rule::fw_device, fw_rule::fw_dir, FW_DIR_IN, fw_rule::fw_dport, fw_rule::fw_dst, fw_rule::fw_op, FW_OP_ALLOW, fw_rule::fw_proto, fw_rule::fw_sport, fw_rule::fw_src, IFNAMSIZ, IP_ADDR_LEN, memset, and strlcpy. Referenced by fw_add(), and fw_delete(). |
1.4.2