RTEMS CPU Kit with SuperCore
Data Structures | Macros
ip_fw.h File Reference
#include <sys/queue.h>
#include <net/if.h>
#include <netinet/in.h>
Include dependency graph for ip_fw.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

union  ip_fw_if
 
struct  ip_fw
 
struct  ip_fw_chain
 

Macros

#define FW_IFNLEN   IFNAMSIZ
 
#define IP_FW_MAX_PORTS   10 /* A reasonable maximum */
 
#define IP_FW_ICMPTYPES_DIM   (32 / (sizeof(unsigned) * 8))
 
#define IP_FW_GETNSRCP(rule)   ((rule)->fw_nports & 0x0f)
 
#define IP_FW_SETNSRCP(rule, n)
 
#define IP_FW_GETNDSTP(rule)   ((rule)->fw_nports >> 4)
 
#define IP_FW_SETNDSTP(rule, n)
 
#define fw_divert_port   fw_un.fu_divert_port
 
#define fw_skipto_rule   fw_un.fu_skipto_rule
 
#define fw_reject_code   fw_un.fu_reject_code
 
#define IP_FW_F_IN   0x0001 /* Check inbound packets */
 
#define IP_FW_F_OUT   0x0002 /* Check outbound packets */
 
#define IP_FW_F_IIFACE   0x0004 /* Apply inbound interface test */
 
#define IP_FW_F_OIFACE   0x0008 /* Apply outbound interface test */
 
#define IP_FW_F_COMMAND   0x0070 /* Mask for type of chain entry: */
 
#define IP_FW_F_DENY   0x0000 /* This is a deny rule */
 
#define IP_FW_F_REJECT   0x0010 /* Deny and send a response packet */
 
#define IP_FW_F_ACCEPT   0x0020 /* This is an accept rule */
 
#define IP_FW_F_COUNT   0x0030 /* This is a count rule */
 
#define IP_FW_F_DIVERT   0x0040 /* This is a divert rule */
 
#define IP_FW_F_TEE   0x0050 /* This is a tee rule */
 
#define IP_FW_F_SKIPTO   0x0060 /* This is a skipto rule */
 
#define IP_FW_F_PRN   0x0080 /* Print if this rule matches */
 
#define IP_FW_F_SRNG
 
#define IP_FW_F_DRNG
 
#define IP_FW_F_IIFNAME   0x0400 /* In interface by name/unit (not IP) */
 
#define IP_FW_F_OIFNAME   0x0800 /* Out interface by name/unit (not IP) */
 
#define IP_FW_F_INVSRC   0x1000 /* Invert sense of src check */
 
#define IP_FW_F_INVDST   0x2000 /* Invert sense of dst check */
 
#define IP_FW_F_FRAG   0x4000 /* Fragment */
 
#define IP_FW_F_ICMPBIT   0x8000 /* ICMP type bitmap is valid */
 
#define IP_FW_F_MASK   0xFFFF /* All possible flag bits mask */
 
#define IF_FW_F_VIAHACK   (IP_FW_F_IN|IP_FW_F_OUT|IP_FW_F_IIFACE|IP_FW_F_OIFACE)
 
#define IP_FW_REJECT_RST   0x0100 /* TCP packets: send RST */
 
#define IP_FW_IPOPT_LSRR   0x01
 
#define IP_FW_IPOPT_SSRR   0x02
 
#define IP_FW_IPOPT_RR   0x04
 
#define IP_FW_IPOPT_TS   0x08
 
#define IP_FW_TCPF_FIN   TH_FIN
 
#define IP_FW_TCPF_SYN   TH_SYN
 
#define IP_FW_TCPF_RST   TH_RST
 
#define IP_FW_TCPF_PSH   TH_PUSH
 
#define IP_FW_TCPF_ACK   TH_ACK
 
#define IP_FW_TCPF_URG   TH_URG
 
#define IP_FW_TCPF_ESTAB   0x40
 

Macro Definition Documentation

◆ IP_FW_F_DRNG

#define IP_FW_F_DRNG
Value:
0x0200 /* The first two dst ports are a min *
* and max range (stored in host byte *
* order). */

◆ IP_FW_F_SRNG

#define IP_FW_F_SRNG
Value:
0x0100 /* The first two src ports are a min *
* and max range (stored in host byte *
* order). */

◆ IP_FW_SETNDSTP

#define IP_FW_SETNDSTP (   rule,
 
)
Value:
do { \
(rule)->fw_nports &= ~0xf0; \
(rule)->fw_nports |= (n) << 4;\
} while (0)

◆ IP_FW_SETNSRCP

#define IP_FW_SETNSRCP (   rule,
 
)
Value:
do { \
(rule)->fw_nports &= ~0x0f; \
(rule)->fw_nports |= (n); \
} while (0)