OpenSDN source code
TrafficAction Class Referenceabstract

#include <traffic_action.h>

Inheritance diagram for TrafficAction:

Public Types

enum  TrafficActionType {
  SIMPLE_ACTION = 1 , MIRROR_ACTION = 2 , VRF_TRANSLATE_ACTION = 3 , LOG_ACTION = 4 ,
  ALERT_ACTION = 5 , QOS_ACTION = 6 , HBS_ACTION = 7
}
 
enum  Action {
  ALERT = 1 , DENY = 3 , LOG = 4 , PASS = 5 ,
  MIRROR = 7 , VRF_TRANSLATE = 8 , APPLY_QOS = 9 , TRAP = 28 ,
  HBS = 10 , IMPLICIT_DENY = 29 , RESERVED = 30 , UNKNOWN = 31
}
 

Public Member Functions

 TrafficAction ()
 
 TrafficAction (Action action, TrafficActionType type)
 
virtual ~TrafficAction ()
 
bool IsDrop () const
 
Action action () const
 
TrafficActionType action_type () const
 
virtual void SetActionSandeshData (std::vector< ActionStr > &actions)
 
virtual bool Compare (const TrafficAction &rhs) const =0
 
bool operator== (const TrafficAction &rhs) const
 

Static Public Member Functions

static std::string ActionToString (enum Action at)
 

Static Public Attributes

static const std::string kActionLogStr = "log"
 
static const std::string kActionAlertStr = "alert"
 
static const std::string kActionHbsStr = "hbs"
 
static const uint32_t DROP_FLAGS = ((1 << DENY))
 
static const uint32_t PASS_FLAGS = ((1 << PASS))
 
static const uint32_t IMPLICIT_DENY_FLAGS = ((1 << IMPLICIT_DENY))
 

Private Attributes

Action action_
 
TrafficActionType action_type_
 

Detailed Description

Definition at line 22 of file traffic_action.h.

Member Enumeration Documentation

◆ Action

Enumerator
ALERT 
DENY 
LOG 
PASS 
MIRROR 
VRF_TRANSLATE 
APPLY_QOS 
TRAP 
HBS 
IMPLICIT_DENY 
RESERVED 
UNKNOWN 

Definition at line 34 of file traffic_action.h.

◆ TrafficActionType

Enumerator
SIMPLE_ACTION 
MIRROR_ACTION 
VRF_TRANSLATE_ACTION 
LOG_ACTION 
ALERT_ACTION 
QOS_ACTION 
HBS_ACTION 

Definition at line 24 of file traffic_action.h.

Constructor & Destructor Documentation

◆ TrafficAction() [1/2]

TrafficAction::TrafficAction ( )
inline

Definition at line 55 of file traffic_action.h.

◆ TrafficAction() [2/2]

TrafficAction::TrafficAction ( Action  action,
TrafficActionType  type 
)
inline

Definition at line 56 of file traffic_action.h.

◆ ~TrafficAction()

virtual TrafficAction::~TrafficAction ( )
inlinevirtual

Definition at line 58 of file traffic_action.h.

Member Function Documentation

◆ action()

Action TrafficAction::action ( ) const
inline

Definition at line 61 of file traffic_action.h.

◆ action_type()

TrafficActionType TrafficAction::action_type ( ) const
inline

Definition at line 62 of file traffic_action.h.

◆ ActionToString()

std::string TrafficAction::ActionToString ( enum Action  at)
static

Definition at line 33 of file traffic_action.cc.

◆ Compare()

virtual bool TrafficAction::Compare ( const TrafficAction rhs) const
pure virtual

◆ IsDrop()

bool TrafficAction::IsDrop ( ) const

Definition at line 25 of file traffic_action.cc.

◆ operator==()

bool TrafficAction::operator== ( const TrafficAction rhs) const
inline

Definition at line 66 of file traffic_action.h.

Here is the call graph for this function:

◆ SetActionSandeshData()

void TrafficAction::SetActionSandeshData ( std::vector< ActionStr > &  actions)
virtual

Reimplemented in QosConfigAction, VrfTranslateAction, and MirrorAction.

Definition at line 61 of file traffic_action.cc.

Here is the call graph for this function:

Member Data Documentation

◆ action_

Action TrafficAction::action_
private

Definition at line 76 of file traffic_action.h.

◆ action_type_

TrafficActionType TrafficAction::action_type_
private

Definition at line 77 of file traffic_action.h.

◆ DROP_FLAGS

const uint32_t TrafficAction::DROP_FLAGS = ((1 << DENY))
static

Definition at line 51 of file traffic_action.h.

◆ IMPLICIT_DENY_FLAGS

const uint32_t TrafficAction::IMPLICIT_DENY_FLAGS = ((1 << IMPLICIT_DENY))
static

Definition at line 53 of file traffic_action.h.

◆ kActionAlertStr

const std::string TrafficAction::kActionAlertStr = "alert"
static

Definition at line 49 of file traffic_action.h.

◆ kActionHbsStr

const std::string TrafficAction::kActionHbsStr = "hbs"
static

Definition at line 50 of file traffic_action.h.

◆ kActionLogStr

const std::string TrafficAction::kActionLogStr = "log"
static

Definition at line 48 of file traffic_action.h.

◆ PASS_FLAGS

const uint32_t TrafficAction::PASS_FLAGS = ((1 << PASS))
static

Definition at line 52 of file traffic_action.h.


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