next up previous contents
Next: RuleOption Up: Dynamic Rules Previous: RuleReference   Contents


The IPInfo structure defines the initial matching criteria for a rule and includes the protocol, src address and port, destination address and port, and direction. Some of the standard strings and variables are predefined - any, HOME_NET, HTTP_SERVERS, HTTP_PORTS, etc.

typedef struct _IPInfo
    u_int8_t protocol;
    char *   src_addr;
    char *   src_port; /* 0 for non TCP/UDP */
    char     direction;     /* non-zero is bi-directional */
    char *   dst_addr;
    char *   dst_port; /* 0 for non TCP/UDP */
} IPInfo;

#define ANY_NET         "any"
#define HOME_NET        "$HOME_NET"
#define ANY_PORT        "any"
#define HTTP_PORTS      "$HTTP_PORTS"

Eugene Misnik 2013-05-08