FD.io VPP
v18.07-34-g55fbdb9
Vector Packet Processing
|
An ACL rule is the building block of an ACL. More...
Public Member Functions | |
l3_rule (uint32_t priority, const action_t &action, const route::prefix_t &src, const route::prefix_t &dst, uint8_t proto=0, uint16_t srcport_or_icmptype_first=0, uint16_t srcport_or_icmptype_last=0, uint16_t dstport_or_icmpcode_first=0, uint16_t dstport_or_icmpcode_last=0, uint8_t tcp_flags_mask=0, uint8_t tcp_flags_value=0) | |
Construct a new object matching the desried state. More... | |
l3_rule (const l3_rule &o)=default | |
Copy Constructor. More... | |
~l3_rule ()=default | |
Destructor. More... | |
std::string | to_string () const |
convert to string format for debug purposes More... | |
bool | operator< (const l3_rule &rule) const |
less-than operator More... | |
bool | operator== (const l3_rule &rule) const |
comparison operator (for testing) More... | |
void | set_src_ip (route::prefix_t src) |
Set Src Ip Address. More... | |
void | set_dst_ip (route::prefix_t dst) |
Set Dst Ip Address. More... | |
void | set_proto (uint8_t proto) |
Set proto. More... | |
void | set_src_from_port (uint16_t srcport_or_icmptype_first) |
Set Src port or ICMP Type first. More... | |
void | set_src_to_port (uint16_t srcport_or_icmptype_last) |
Set Src port or ICMP Type last. More... | |
void | set_dst_from_port (uint16_t dstport_or_icmpcode_first) |
Set Dst port or ICMP code first. More... | |
void | set_dst_to_port (uint16_t dstport_or_icmpcode_last) |
Set Dst port or ICMP code last. More... | |
void | set_tcp_flags_mask (uint8_t tcp_flags_mask) |
Set TCP flags mask. More... | |
void | set_tcp_flags_value (uint8_t tcp_flags_value) |
Set TCP flags value. More... | |
const route::prefix_t & | src () const |
Getters. More... | |
uint32_t | priority () const |
const action_t & | action () const |
const route::prefix_t & | dst () const |
uint8_t | proto () const |
uint16_t | srcport_or_icmptype_first () const |
uint16_t | srcport_or_icmptype_last () const |
uint16_t | dstport_or_icmpcode_first () const |
uint16_t | dstport_or_icmpcode_last () const |
uint8_t | tcp_flags_mask () const |
uint8_t | tcp_flags_value () const |
An ACL rule is the building block of an ACL.
An ACL, which is the object applied to an interface, is comprised of an ordersed sequence of ACL rules. This class is a wrapper around the VAPI generated struct and exports an API with better types.
Definition at line 31 of file acl_l3_rule.hpp.
VOM::ACL::l3_rule::l3_rule | ( | uint32_t | priority, |
const action_t & | action, | ||
const route::prefix_t & | src, | ||
const route::prefix_t & | dst, | ||
uint8_t | proto = 0 , |
||
uint16_t | srcport_or_icmptype_first = 0 , |
||
uint16_t | srcport_or_icmptype_last = 0 , |
||
uint16_t | dstport_or_icmpcode_first = 0 , |
||
uint16_t | dstport_or_icmpcode_last = 0 , |
||
uint8_t | tcp_flags_mask = 0 , |
||
uint8_t | tcp_flags_value = 0 |
||
) |
Construct a new object matching the desried state.
Definition at line 22 of file acl_l3_rule.cpp.
|
default |
Copy Constructor.
|
default |
Destructor.
const action_t & VOM::ACL::l3_rule::action | ( | ) | const |
const route::prefix_t & VOM::ACL::l3_rule::dst | ( | ) | const |
uint16_t VOM::ACL::l3_rule::dstport_or_icmpcode_first | ( | ) | const |
uint16_t VOM::ACL::l3_rule::dstport_or_icmpcode_last | ( | ) | const |
less-than operator
Definition at line 48 of file acl_l3_rule.cpp.
comparison operator (for testing)
Definition at line 54 of file acl_l3_rule.cpp.
uint32_t VOM::ACL::l3_rule::priority | ( | ) | const |
Definition at line 145 of file acl_l3_rule.cpp.
uint8_t VOM::ACL::l3_rule::proto | ( | ) | const |
void VOM::ACL::l3_rule::set_dst_from_port | ( | uint16_t | dstport_or_icmpcode_first | ) |
Set Dst port or ICMP code first.
Definition at line 115 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_dst_ip | ( | route::prefix_t | dst | ) |
Set Dst Ip Address.
Definition at line 92 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_dst_to_port | ( | uint16_t | dstport_or_icmpcode_last | ) |
Set Dst port or ICMP code last.
Definition at line 121 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_proto | ( | uint8_t | proto | ) |
void VOM::ACL::l3_rule::set_src_from_port | ( | uint16_t | srcport_or_icmptype_first | ) |
Set Src port or ICMP Type first.
Definition at line 103 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_src_ip | ( | route::prefix_t | src | ) |
Set Src Ip Address.
Definition at line 86 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_src_to_port | ( | uint16_t | srcport_or_icmptype_last | ) |
Set Src port or ICMP Type last.
Definition at line 109 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_tcp_flags_mask | ( | uint8_t | tcp_flags_mask | ) |
Set TCP flags mask.
Definition at line 127 of file acl_l3_rule.cpp.
void VOM::ACL::l3_rule::set_tcp_flags_value | ( | uint8_t | tcp_flags_value | ) |
Set TCP flags value.
Definition at line 133 of file acl_l3_rule.cpp.
const route::prefix_t & VOM::ACL::l3_rule::src | ( | ) | const |
Getters.
Definition at line 139 of file acl_l3_rule.cpp.
uint16_t VOM::ACL::l3_rule::srcport_or_icmptype_first | ( | ) | const |
uint16_t VOM::ACL::l3_rule::srcport_or_icmptype_last | ( | ) | const |
uint8_t VOM::ACL::l3_rule::tcp_flags_mask | ( | ) | const |
uint8_t VOM::ACL::l3_rule::tcp_flags_value | ( | ) | const |
std::string VOM::ACL::l3_rule::to_string | ( | void | ) | const |
convert to string format for debug purposes
Definition at line 67 of file acl_l3_rule.cpp.