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

#include <acl.h>

Inheritance diagram for AclTable:
Collaboration diagram for AclTable:

Public Types

typedef std::map< std::string,
TrafficAction::Action
TrafficActionMap
 
typedef std::set< AclDBEntry * > UnResolvedAclEntries
 
typedef boost::function< void(const
AclDBEntry *acl,
AclFlowCountResp &data, const
std::string &ace_id)> 
FlowAceSandeshDataFn
 
typedef boost::function< void(const
AclDBEntry *acl, AclFlowResp
&data, const int last_count)> 
FlowAclSandeshDataFn
 
- Public Types inherited from DBTable
typedef boost::intrusive_ptr
< DBTableWalk
DBTableWalkRef
 
typedef boost::function< bool(DBTablePartBase
*, DBEntryBase *)> 
WalkFn
 
typedef boost::function< void(DBTableWalkRef,
DBTableBase *)> 
WalkCompleteFn
 
- Public Types inherited from DBTableBase
typedef boost::function< void(DBTablePartBase
*, DBEntryBase *)> 
ChangeCallback
 
typedef int ListenerId
 

Public Member Functions

 AclTable (DB *db, const std::string &name)
 
virtual ~AclTable ()
 
void GetTables (DB *db)
 
virtual std::unique_ptr< DBEntryAllocEntry (const DBRequestKey *k) const
 
virtual size_t Hash (const DBEntry *entry) const
 
virtual size_t Hash (const DBRequestKey *key) const
 
virtual DBEntryOperDBAdd (const DBRequest *req)
 
virtual bool OperDBOnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool OperDBDelete (DBEntry *entry, const DBRequest *req)
 
virtual bool OperDBResync (DBEntry *entry, const DBRequest *req)
 
virtual bool IFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
void FirewallPolicyIFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u, AclSpec &acl_spec)
 
void AclIFNodeToReq (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u, AclSpec &acl_spec)
 
virtual bool IFNodeToUuid (IFMapNode *node, boost::uuids::uuid &u)
 
virtual AgentSandeshPtr GetAgentSandesh (const AgentSandeshArguments *args, const std::string &context)
 
TrafficAction::Action ConvertActionString (std::string action) const
 
void set_ace_flow_sandesh_data_cb (FlowAceSandeshDataFn fn)
 
void set_acl_flow_sandesh_data_cb (FlowAclSandeshDataFn fn)
 
void ListenerInit ()
 
void Notify (DBTablePartBase *partition, DBEntryBase *e)
 
void AddUnresolvedEntry (AclDBEntry *entry)
 
void DeleteUnresolvedEntry (AclDBEntry *entry)
 
- Public Member Functions inherited from AgentOperDBTable
 AgentOperDBTable (DB *db, const std::string &name)
 
 AgentOperDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentOperDBTable ()
 
virtual void ConfigEventHandler (IFMapNode *node, DBEntry *entry)
 
- Public Member Functions inherited from AgentDBTable
 AgentDBTable (DB *db, const std::string &name)
 
 AgentDBTable (DB *db, const std::string &name, bool del_on_zero_refcount)
 
virtual ~AgentDBTable ()
 
virtual int PartitionCount () const
 
virtual void Input (DBTablePartition *root, DBClient *client, DBRequest *req)
 
virtual DBEntryCfgAdd (DBRequest *req)
 
virtual void Clear ()
 
virtual bool IFLinkToReq (IFMapLink *link, IFMapNode *node, const std::string &peer_name, IFMapNode *peer, DBRequest &req)
 
virtual DBTablePartitionAllocPartition (int index)
 
virtual void OnZeroRefcount (AgentDBEntry *e)
 
virtual void NotifyEntry (DBEntryBase *entry)
 
void Notify (DBTablePartBase *partition, DBEntryBase *entry)
 
DBTableBase::ListenerId GetRefListenerId () const
 
AgentDBEntryFindActiveEntry (const DBEntry *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBEntry *key)
 
AgentDBEntryFindActiveEntry (const DBRequestKey *key)
 
AgentDBEntryFindActiveEntryNoLock (const DBRequestKey *key)
 
AgentDBEntryFind (const DBEntry *key, bool ret_del)
 
AgentDBEntryFind (const DBRequestKey *key, bool ret_del)
 
virtual bool CanNotify (IFMapNode *dbe)
 
virtual void Process (DBRequest &req)
 
virtual bool ProcessConfig (IFMapNode *node, DBRequest &req, const boost::uuids::uuid &u)
 
void set_agent (Agent *agent)
 
Agentagent () const
 
void Flush ()
 
void reset_flush_walk_ref ()
 
SandeshTraceBufferPtr GetOperDBTraceBuf () const
 
- Public Member Functions inherited from DBTable
 DBTable (DB *db, const std::string &name)
 
virtual ~DBTable ()
 
void Init ()
 
void NotifyAllEntries ()
 
DBEntryFind (const DBEntry *entry)
 
const DBEntryFind (const DBEntry *entry) const
 
DBEntryFind (const DBRequestKey *key, int id=-1)
 
const DBEntryFind (const DBRequestKey *key, int id=-1) const
 
DBEntryFindNoLock (const DBEntry *entry)
 
DBEntryFindNoLock (const DBRequestKey *key)
 
virtual DBTablePartBaseGetTablePartition (const DBRequestKey *key)
 
virtual const DBTablePartBaseGetTablePartition (const DBRequestKey *key) const
 
virtual DBTablePartBaseGetTablePartition (const DBEntryBase *entry)
 
virtual const DBTablePartBaseGetTablePartition (const DBEntryBase *entry) const
 
virtual DBTablePartBaseGetTablePartition (const int index)
 
virtual const DBTablePartBaseGetTablePartition (const int index) const
 
virtual void Change (DBEntryBase *entry)
 
virtual size_t Size () const
 
DBTableWalkRef AllocWalker (WalkFn walk_fn, WalkCompleteFn walk_complete)
 
void ReleaseWalker (DBTableWalkRef &walk)
 
void WalkTable (DBTableWalkRef walk)
 
void WalkAgain (DBTableWalkRef walk)
 
void SetWalkIterationToYield (int count)
 
int GetWalkIterationToYield ()
 
void SetWalkTaskId (int task_id)
 
int GetWalkerTaskId ()
 
- Public Member Functions inherited from DBTableBase
 DBTableBase (DB *db, const std::string &name)
 
virtual ~DBTableBase ()
 
bool Enqueue (DBRequest *req)
 
void EnqueueRemove (DBEntryBase *db_entry)
 
virtual void AddRemoveCallback (const DBEntryBase *entry, bool add) const
 
ListenerId Register (ChangeCallback callback, const std::string &name="unspecified")
 
void Unregister (ListenerId listener)
 
void RunNotify (DBTablePartBase *tpart, DBEntryBase *entry)
 
void AddToDBStateCount (ListenerId listener, int count)
 
uint64_t GetDBStateCount (ListenerId listener)
 
bool empty () const
 
virtual void RetryDelete ()
 
virtual bool MayDelete () const
 
DBdatabase ()
 
const DBdatabase () const
 
const std::string & name () const
 
bool HasListeners () const
 
size_t GetListenerCount () const
 
void FillListeners (std::vector< ShowTableListener > *listeners) const
 
uint64_t enqueue_count () const
 
void incr_enqueue_count ()
 
void reset_enqueue_count ()
 
uint64_t input_count () const
 
void incr_input_count ()
 
void reset_input_count ()
 
uint64_t notify_count () const
 
void incr_notify_count ()
 
void reset_notify_count ()
 
bool HasWalkers () const
 
uint64_t walker_count () const
 
void incr_walker_count ()
 
uint64_t decr_walker_count ()
 
uint64_t walk_request_count () const
 
uint64_t walk_complete_count () const
 
uint64_t walk_cancel_count () const
 
uint64_t walk_again_count () const
 
uint64_t walk_count () const
 
void incr_walk_request_count ()
 
void incr_walk_complete_count ()
 
void incr_walk_cancel_count ()
 
void incr_walk_again_count ()
 
void incr_walk_count ()
 

Static Public Member Functions

static DBTableBaseCreateTable (DB *db, const std::string &name)
 
static void AclFlowResponse (const std::string acl_uuid_str, const std::string ctx, const int last_count)
 
static void AclFlowCountResponse (const std::string acl_uuid_str, const std::string ctx, const std::string &ace_id)
 
- Static Public Member Functions inherited from DBTable
static void DBStateClear (DBTable *table, ListenerId id)
 

Private Member Functions

bool SubnetTypeEqual (const autogen::SubnetType &lhs, const autogen::SubnetType &rhs) const
 
bool AddressTypeEqual (const autogen::AddressType &lhs, const autogen::AddressType &rhs) const
 
bool PortTypeEqual (const autogen::PortType &src, const autogen::PortType &dst) const
 
void AddImplicitRule (AclSpec &acl_spec, AclEntrySpec &ace_spec, const autogen::FirewallRule *rule)
 
void PopulateServicePort (AclEntrySpec &ace_spec, IFMapNode *node)
 
IFMapNodeGetFirewallRule (IFMapNode *node)
 
void ActionInit ()
 
 DISALLOW_COPY_AND_ASSIGN (AclTable)
 

Static Private Member Functions

static const AclDBEntryGetAclDBEntry (const std::string uuid_str, const std::string ctx, SandeshResponse *resp)
 

Private Attributes

DBTableBase::ListenerId qos_config_listener_id_
 
UnResolvedAclEntries unresolved_acl_entries_
 
TrafficActionMap ta_map_
 
FlowAceSandeshDataFn flow_ace_sandesh_data_cb_
 
FlowAclSandeshDataFn flow_acl_sandesh_data_cb_
 

Additional Inherited Members

- Static Public Attributes inherited from AgentDBTable
static const int kPartitionCount = 1
 
- Static Public Attributes inherited from DBTable
static const int kIterationToYield = 256
 
- Static Public Attributes inherited from DBTableBase
static const int kInvalidId = -1
 
- Protected Member Functions inherited from AgentOperDBTable
void UpdateIfMapNode (AgentOperDBEntry *entry, IFMapNode *node)
 
virtual DBEntryAdd (const DBRequest *req)
 
virtual bool OnChange (DBEntry *entry, const DBRequest *req)
 
virtual bool Resync (DBEntry *entry, const DBRequest *req)
 
virtual bool Delete (DBEntry *entry, const DBRequest *req)
 

Detailed Description

Definition at line 147 of file acl.h.

Member Typedef Documentation

typedef boost::function<void(const AclDBEntry *acl, AclFlowCountResp &data, const std::string &ace_id)> AclTable::FlowAceSandeshDataFn

Definition at line 156 of file acl.h.

typedef boost::function<void(const AclDBEntry *acl, AclFlowResp &data, const int last_count)> AclTable::FlowAclSandeshDataFn

Definition at line 158 of file acl.h.

typedef std::map<std::string, TrafficAction::Action> AclTable::TrafficActionMap

Definition at line 149 of file acl.h.

Definition at line 150 of file acl.h.

Constructor & Destructor Documentation

AclTable::AclTable ( DB db,
const std::string &  name 
)
inline

Definition at line 160 of file acl.h.

virtual AclTable::~AclTable ( )
inlinevirtual

Definition at line 161 of file acl.h.

Member Function Documentation

void AclTable::AclFlowCountResponse ( const std::string  acl_uuid_str,
const std::string  ctx,
const std::string &  ace_id 
)
static

Definition at line 965 of file acl.cc.

Here is the call graph for this function:

void AclTable::AclFlowResponse ( const std::string  acl_uuid_str,
const std::string  ctx,
const int  last_count 
)
static

Definition at line 949 of file acl.cc.

Here is the call graph for this function:

void AclTable::AclIFNodeToReq ( IFMapNode node,
DBRequest req,
const boost::uuids::uuid u,
AclSpec acl_spec 
)

Definition at line 607 of file acl.cc.

Here is the call graph for this function:

void AclTable::ActionInit ( )
private

Definition at line 211 of file acl.cc.

void AclTable::AddImplicitRule ( AclSpec acl_spec,
AclEntrySpec ace_spec,
const autogen::FirewallRule *  rule 
)
private

Definition at line 495 of file acl.cc.

Here is the call graph for this function:

bool AclTable::AddressTypeEqual ( const autogen::AddressType &  lhs,
const autogen::AddressType &  rhs 
) const
private

Definition at line 574 of file acl.cc.

Here is the call graph for this function:

void AclTable::AddUnresolvedEntry ( AclDBEntry entry)

Definition at line 228 of file acl.cc.

std::unique_ptr< DBEntry > AclTable::AllocEntry ( const DBRequestKey k) const
virtual

Implements DBTable.

Definition at line 101 of file acl.cc.

TrafficAction::Action AclTable::ConvertActionString ( std::string  action) const

Definition at line 218 of file acl.cc.

DBTableBase * AclTable::CreateTable ( DB db,
const std::string &  name 
)
static

Definition at line 274 of file acl.cc.

Here is the call graph for this function:

void AclTable::DeleteUnresolvedEntry ( AclDBEntry entry)

Definition at line 232 of file acl.cc.

AclTable::DISALLOW_COPY_AND_ASSIGN ( AclTable  )
private
void AclTable::FirewallPolicyIFNodeToReq ( IFMapNode node,
DBRequest req,
const boost::uuids::uuid u,
AclSpec acl_spec 
)

Definition at line 506 of file acl.cc.

Here is the call graph for this function:

const AclDBEntry * AclTable::GetAclDBEntry ( const std::string  uuid_str,
const std::string  ctx,
SandeshResponse resp 
)
staticprivate

Definition at line 921 of file acl.cc.

Here is the call graph for this function:

AgentSandeshPtr AclTable::GetAgentSandesh ( const AgentSandeshArguments args,
const std::string &  context 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 986 of file acl.cc.

Here is the call graph for this function:

IFMapNode * AclTable::GetFirewallRule ( IFMapNode node)
private

Definition at line 474 of file acl.cc.

Here is the call graph for this function:

void AclTable::GetTables ( DB db)
inline

Definition at line 162 of file acl.h.

virtual size_t AclTable::Hash ( const DBEntry entry) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 165 of file acl.h.

virtual size_t AclTable::Hash ( const DBRequestKey key) const
inlinevirtual

Reimplemented from DBTable.

Definition at line 166 of file acl.h.

bool AclTable::IFNodeToReq ( IFMapNode node,
DBRequest req,
const boost::uuids::uuid u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 650 of file acl.cc.

Here is the call graph for this function:

bool AclTable::IFNodeToUuid ( IFMapNode node,
boost::uuids::uuid u 
)
virtual

Reimplemented from AgentDBTable.

Definition at line 403 of file acl.cc.

Here is the call graph for this function:

void AclTable::ListenerInit ( )

Definition at line 268 of file acl.cc.

Here is the call graph for this function:

void AclTable::Notify ( DBTablePartBase partition,
DBEntryBase e 
)

Definition at line 236 of file acl.cc.

Here is the call graph for this function:

DBEntry * AclTable::OperDBAdd ( const DBRequest req)
virtual

Implements AgentOperDBTable.

Definition at line 107 of file acl.cc.

Here is the call graph for this function:

bool AclTable::OperDBDelete ( DBEntry entry,
const DBRequest req 
)
virtual

Implements AgentOperDBTable.

Definition at line 203 of file acl.cc.

Here is the call graph for this function:

bool AclTable::OperDBOnChange ( DBEntry entry,
const DBRequest req 
)
virtual

Implements AgentOperDBTable.

Definition at line 127 of file acl.cc.

Here is the call graph for this function:

bool AclTable::OperDBResync ( DBEntry entry,
const DBRequest req 
)
virtual

Reimplemented from AgentOperDBTable.

Definition at line 199 of file acl.cc.

Here is the call graph for this function:

void AclTable::PopulateServicePort ( AclEntrySpec ace_spec,
IFMapNode node 
)
private

Definition at line 454 of file acl.cc.

Here is the call graph for this function:

bool AclTable::PortTypeEqual ( const autogen::PortType &  src,
const autogen::PortType &  dst 
) const
private

Definition at line 598 of file acl.cc.

void AclTable::set_ace_flow_sandesh_data_cb ( FlowAceSandeshDataFn  fn)

Definition at line 1576 of file acl.cc.

void AclTable::set_acl_flow_sandesh_data_cb ( FlowAclSandeshDataFn  fn)

Definition at line 1580 of file acl.cc.

bool AclTable::SubnetTypeEqual ( const autogen::SubnetType &  lhs,
const autogen::SubnetType &  rhs 
) const
private

Definition at line 565 of file acl.cc.

Member Data Documentation

FlowAceSandeshDataFn AclTable::flow_ace_sandesh_data_cb_
private

Definition at line 216 of file acl.h.

FlowAclSandeshDataFn AclTable::flow_acl_sandesh_data_cb_
private

Definition at line 217 of file acl.h.

DBTableBase::ListenerId AclTable::qos_config_listener_id_
private

Definition at line 213 of file acl.h.

TrafficActionMap AclTable::ta_map_
private

Definition at line 215 of file acl.h.

UnResolvedAclEntries AclTable::unresolved_acl_entries_
private

Definition at line 214 of file acl.h.


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