FD.io VPP  v18.11-rc0-18-g2a3fb1a
Vector Packet Processing
VOM::ACL::l3_rule Class Reference

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_tsrc () const
 Getters. More...
 
uint32_t priority () const
 
const action_taction () const
 
const route::prefix_tdst () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

VOM::ACL::l3_rule::l3_rule ( const l3_rule o)
default

Copy Constructor.

VOM::ACL::l3_rule::~l3_rule ( )
default

Destructor.

Member Function Documentation

const action_t & VOM::ACL::l3_rule::action ( ) const

Definition at line 151 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

const route::prefix_t & VOM::ACL::l3_rule::dst ( ) const

Definition at line 157 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint16_t VOM::ACL::l3_rule::dstport_or_icmpcode_first ( ) const

Definition at line 181 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint16_t VOM::ACL::l3_rule::dstport_or_icmpcode_last ( ) const

Definition at line 187 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

bool VOM::ACL::l3_rule::operator< ( const l3_rule rule) const

less-than operator

Definition at line 48 of file acl_l3_rule.cpp.

bool VOM::ACL::l3_rule::operator== ( const l3_rule rule) const

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

Definition at line 163 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

void VOM::ACL::l3_rule::set_proto ( uint8_t  proto)

Set proto.

Definition at line 98 of file acl_l3_rule.cpp.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

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.

+ Here is the call graph for this function:

const route::prefix_t & VOM::ACL::l3_rule::src ( ) const

Getters.

Definition at line 139 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint16_t VOM::ACL::l3_rule::srcport_or_icmptype_first ( ) const

Definition at line 169 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint16_t VOM::ACL::l3_rule::srcport_or_icmptype_last ( ) const

Definition at line 175 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint8_t VOM::ACL::l3_rule::tcp_flags_mask ( ) const

Definition at line 193 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

uint8_t VOM::ACL::l3_rule::tcp_flags_value ( ) const

Definition at line 199 of file acl_l3_rule.cpp.

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: