OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AddressMatch Class Reference

#include <acl_entry_match.h>

Inheritance diagram for AddressMatch:
Collaboration diagram for AddressMatch:

Public Types

enum  AddressType {
  IP_ADDR = 1, NETWORK_ID = 2, SG = 3, TAGS = 4,
  ADDRESS_GROUP = 5, UNKNOWN_TYPE = 6
}
 
typedef boost::uuids::uuid uuid
 
- Public Types inherited from AclEntryMatch
enum  Type {
  SOURCE_PORT_MATCH, DESTINATION_PORT_MATCH, PROTOCOL_MATCH, ADDRESS_MATCH,
  SERVICE_GROUP_MATCH, TAGS_MATCH
}
 

Public Member Functions

 AddressMatch ()
 
 ~AddressMatch ()
 
void SetSource (bool src)
 
void SetNetworkID (const uuid id)
 
void SetNetworkIDStr (const std::string id)
 
void SetSGId (const uint32_t id)
 
void SetTags (const TagList &tags)
 
void SetAddressGroup (const std::vector< AclAddressInfo > &list, const TagList &tags)
 
const TagListtags () const
 
void SetIPAddress (const std::vector< AclAddressInfo > &list)
 
bool Match (const PacketHeader *packet_header, FlowPolicyInfo *info) const
 
void SetAclEntryMatchSandeshData (AclEntrySandeshData &data)
 
virtual bool Compare (const AclEntryMatch &rhs) const
 
size_t ip_list_size () const
 
- Public Member Functions inherited from AclEntryMatch
 AclEntryMatch (Type type)
 
virtual ~AclEntryMatch ()
 
bool operator== (const AclEntryMatch &rhs) const
 

Static Public Member Functions

static std::string BuildIpMaskList (const std::vector< AclAddressInfo > &list)
 
static std::string BuildTags (const TagList &list)
 

Static Public Attributes

static const int kAny = -1
 

Private Member Functions

bool SGMatch (const SecurityGroupList &sg_l, int id) const
 
bool SGMatch (const SecurityGroupList *sg_l, int id) const
 
bool TagsMatch (const TagList &tags) const
 
bool TagsMatchAG (const TagList &tags) const
 
bool AddressGroupMatch (const IpAddress &ip, const TagList &tags) const
 

Private Attributes

AddressType addr_type_
 
bool src_
 
std::vector< AclAddressInfoip_list_
 
uuid policy_id_
 
std::string policy_id_s_
 
int sg_id_
 
TagList tags_
 

Detailed Description

Definition at line 198 of file acl_entry_match.h.

Member Typedef Documentation

typedef boost::uuids::uuid AddressMatch::uuid

Definition at line 200 of file acl_entry_match.h.

Member Enumeration Documentation

Enumerator
IP_ADDR 
NETWORK_ID 
SG 
TAGS 
ADDRESS_GROUP 
UNKNOWN_TYPE 

Definition at line 203 of file acl_entry_match.h.

Constructor & Destructor Documentation

AddressMatch::AddressMatch ( )
inline

Definition at line 212 of file acl_entry_match.h.

AddressMatch::~AddressMatch ( )
inline

Definition at line 213 of file acl_entry_match.h.

Member Function Documentation

bool AddressMatch::AddressGroupMatch ( const IpAddress ip,
const TagList tags 
) const
private

Definition at line 508 of file acl_entry.cc.

Here is the call graph for this function:

std::string AddressMatch::BuildIpMaskList ( const std::vector< AclAddressInfo > &  list)
static

Definition at line 624 of file acl_entry.cc.

std::string AddressMatch::BuildTags ( const TagList list)
static

Definition at line 641 of file acl_entry.cc.

bool AddressMatch::Compare ( const AclEntryMatch rhs) const
virtual

Implements AclEntryMatch.

Definition at line 578 of file acl_entry.cc.

size_t AddressMatch::ip_list_size ( ) const
inline

Definition at line 242 of file acl_entry_match.h.

bool AddressMatch::Match ( const PacketHeader packet_header,
FlowPolicyInfo info 
) const
virtual

Implements AclEntryMatch.

Definition at line 522 of file acl_entry.cc.

Here is the call graph for this function:

void AddressMatch::SetAclEntryMatchSandeshData ( AclEntrySandeshData &  data)
virtual

Implements AclEntryMatch.

Definition at line 660 of file acl_entry.cc.

Here is the call graph for this function:

void AddressMatch::SetAddressGroup ( const std::vector< AclAddressInfo > &  list,
const TagList tags 
)

Definition at line 350 of file acl_entry.cc.

Here is the call graph for this function:

void AddressMatch::SetIPAddress ( const std::vector< AclAddressInfo > &  list)

Definition at line 344 of file acl_entry.cc.

void AddressMatch::SetNetworkID ( const uuid  id)

Definition at line 357 of file acl_entry.cc.

void AddressMatch::SetNetworkIDStr ( const std::string  id)

Definition at line 363 of file acl_entry.cc.

void AddressMatch::SetSGId ( const uint32_t  id)

Definition at line 369 of file acl_entry.cc.

void AddressMatch::SetSource ( bool  src)

Definition at line 375 of file acl_entry.cc.

void AddressMatch::SetTags ( const TagList tags)
inline

Definition at line 222 of file acl_entry_match.h.

Here is the call graph for this function:

bool AddressMatch::SGMatch ( const SecurityGroupList sg_l,
int  id 
) const
private

Definition at line 397 of file acl_entry.cc.

bool AddressMatch::SGMatch ( const SecurityGroupList sg_l,
int  id 
) const
private

Definition at line 380 of file acl_entry.cc.

const TagList& AddressMatch::tags ( ) const
inline

Definition at line 230 of file acl_entry_match.h.

bool AddressMatch::TagsMatch ( const TagList tags) const
private

Definition at line 410 of file acl_entry.cc.

bool AddressMatch::TagsMatchAG ( const TagList tags) const
private

Definition at line 440 of file acl_entry.cc.

Member Data Documentation

AddressType AddressMatch::addr_type_
private

Definition at line 246 of file acl_entry_match.h.

std::vector<AclAddressInfo> AddressMatch::ip_list_
private

Definition at line 250 of file acl_entry_match.h.

const int AddressMatch::kAny = -1
static

Definition at line 201 of file acl_entry_match.h.

uuid AddressMatch::policy_id_
private

Definition at line 252 of file acl_entry_match.h.

std::string AddressMatch::policy_id_s_
private

Definition at line 253 of file acl_entry_match.h.

int AddressMatch::sg_id_
private

Definition at line 254 of file acl_entry_match.h.

bool AddressMatch::src_
private

Definition at line 247 of file acl_entry_match.h.

TagList AddressMatch::tags_
private

Definition at line 255 of file acl_entry_match.h.


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