|
xorp
|
Firewall Table Entry. More...
#include <firewall_entry.hh>
Public Types | |
| enum | Action { ACTION_MIN = 0x00, ACTION_ANY = 0x00, ACTION_NONE = 0x01, ACTION_PASS = 0x02, ACTION_DROP = 0x03, ACTION_REJECT = 0x04, ACTION_MAX = 0x05, ACTION_INVALID = 0xff } |
| enum | { RULE_NUMBER_DEFAULT = 0, IP_PROTOCOL_MIN = 0, IP_PROTOCOL_MAX = 255, IP_PROTOCOL_ANY = 0, PORT_MIN = 0, PORT_MAX = 65535 } |
Public Member Functions | |
| FirewallEntry (int family) | |
| FirewallEntry (uint32_t rule_number, const string &ifname, const string &vifname, const IPvXNet &src_network, const IPvXNet &dst_network, uint8_t ip_protocol, uint16_t src_port_begin, uint16_t src_port_end, uint16_t dst_port_begin, uint16_t dst_port_end, FirewallEntry::Action action) | |
| bool | is_ipv4 () const |
| Test whether this is an IPv4 entry. | |
| bool | is_ipv6 () const |
| Test whether this is an IPv6 entry. | |
| uint32_t | rule_number () const |
| const string & | ifname () const |
| const string & | vifname () const |
| const IPvXNet & | src_network () const |
| const IPvXNet & | dst_network () const |
| uint8_t | ip_protocol () const |
| uint32_t | src_port_begin () const |
| uint32_t | src_port_end () const |
| uint32_t | dst_port_begin () const |
| uint32_t | dst_port_end () const |
| FirewallEntry::Action | action () const |
| void | zero () |
| Reset all members. | |
| bool | match (const FirewallEntry &other) const |
| Comparison function for an exact match with the entry. | |
| string | str () const |
Static Public Member Functions | |
| static string | action2str (FirewallEntry::Action action) |
| Convert firewall entry action value to a string representation. | |
| static FirewallEntry::Action | str2action (const string &name) |
| Convert string representation to a firewall entry action value. | |
Private Attributes | |
| uint32_t | _rule_number |
| string | _ifname |
| string | _vifname |
| IPvXNet | _src_network |
| IPvXNet | _dst_network |
| uint8_t | _ip_protocol |
| uint16_t | _src_port_begin |
| uint32_t | _src_port_end |
| uint32_t | _dst_port_begin |
| uint32_t | _dst_port_end |
| FirewallEntry::Action | _action |
Firewall Table Entry.
Representation of a firewall table entry.
| string FirewallEntry::action2str | ( | FirewallEntry::Action | action | ) | [static] |
| bool FirewallEntry::is_ipv4 | ( | ) | const [inline] |
| bool FirewallEntry::is_ipv6 | ( | ) | const [inline] |
| bool FirewallEntry::match | ( | const FirewallEntry & | other | ) | const [inline] |
| string FirewallEntry::str | ( | ) | const [inline] |
| FirewallEntry::Action FirewallEntry::str2action | ( | const string & | name | ) | [static] |