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

#include <inet_interface.h>

Inheritance diagram for InetInterface:
Collaboration diagram for InetInterface:

Public Types

enum  SubType { VHOST, LINK_LOCAL, SIMPLE_GATEWAY }
 
- Public Types inherited from Interface
enum  Type {
  INVALID, PHYSICAL, REMOTE_PHYSICAL, LOGICAL,
  VM_INTERFACE, INET, PACKET
}
 
enum  Trace {
  ADD, DEL, ACTIVATED, DEACTIVATED,
  FLOATING_IP_CHANGE, SERVICE_CHANGE
}
 
enum  MirrorDirection { MIRROR_RX_TX, MIRROR_RX, MIRROR_TX, UNKNOWN }
 
enum  Transport {
  TRANSPORT_INVALID, TRANSPORT_VIRTUAL, TRANSPORT_ETHERNET, TRANSPORT_SOCKET,
  TRANSPORT_PMD
}
 
- Public Types inherited from AgentDBEntry
typedef boost::intrusive_ptr
< AgentDBEntry
AgentDBEntyRef
 
- Public Types inherited from DBEntryBase
typedef DBTableBase::ListenerId ListenerId
 
typedef std::unique_ptr
< DBRequestKey
KeyPtr
 

Public Member Functions

 InetInterface (const std::string &name)
 
 InetInterface (const std::string &name, SubType sub_type, VrfEntry *vrf, const Ip4Address &ip_addr, int plen, const Ip4Address &gw, Interface *xconnect, const std::string &vn_name)
 
virtual ~InetInterface ()
 
KeyPtr GetDBRequestKey () const
 
std::string ToString () const
 
virtual bool CmpInterface (const DBEntry &rhs) const
 
SubType sub_type () const
 
const Ip4Addressip_addr () const
 
Interfacexconnect () const
 
void PostAdd ()
 
bool OnChange (InetInterfaceData *data)
 
bool Delete (const DBRequest *req)
 
void Activate ()
 
void DeActivate ()
 
void ActivateSimpleGateway ()
 
void DeActivateSimpleGateway ()
 
void ActivateHostInterface ()
 
void DeActivateHostInterface ()
 
void AddHostMulticastRoutes ()
 
void DelHostMulticastRoutes ()
 
- Public Member Functions inherited from Interface
 Interface (Type type, const boost::uuids::uuid &uuid, const std::string &name, VrfEntry *vrf, bool os_oper_state, const boost::uuids::uuid &logical_router_uuid)
 
virtual ~Interface ()
 
virtual void SetKey (const DBRequestKey *key)
 
virtual void Add ()
 
virtual void SendTrace (const AgentDBTable *table, Trace event) const
 
virtual void GetOsParams (Agent *agent)
 
void SetPciIndex (Agent *agent, size_t index)
 
bool IsLess (const DBEntry &rhs) const
 
uint32_t vrf_id () const
 
uint32_t GetRefCount () const
 
bool DBEntrySandesh (Sandesh *sresp, std::string &name) const
 
bool IsTunnelEnabled () const
 
Type type () const
 
const boost::uuids::uuidGetUuid () const
 
const std::string & name () const
 
VrfEntryvrf () const
 
bool ipv4_active () const
 
bool ipv6_active () const
 
bool is_hc_active () const
 
bool metadata_ip_active () const
 
bool metadata_l2_active () const
 
bool ip_active (Address::Family family) const
 
bool l2_active () const
 
const uint32_t id () const
 
bool dhcp_enabled () const
 
bool dhcp_enabled_v6 () const
 
bool dns_enabled () const
 
uint32_t label () const
 
uint32_t l2_label () const
 
bool IsL2LabelValid (uint32_t label) const
 
uint32_t os_index () const
 
const MacAddressmac () const
 
bool os_oper_state () const
 
bool admin_state () const
 
void set_test_oper_state (bool val)
 
void set_flow_key_nh (const NextHop *nh)
 
const NextHopflow_key_nh () const
 
Interface::Transport transport () const
 
bool IsUveActive () const
 
const AgentQosConfigqos_config () const
 
void UpdateOperStateOfSubIntf (const InterfaceTable *table)
 
bool NeedDefaultOsOperStateDisabled (Agent *agent) const
 
boost::optional
< InterfaceOsParams::IfGuid
os_guid () const
 
const boost::uuids::uuidlogical_router_uuid () const
 
void set_logical_router_uuid (const boost::uuids::uuid &logical_router_uuid)
 
InterfaceOsParams get_os_params ()
 
- Public Member Functions inherited from AgentOperDBEntry
 AgentOperDBEntry ()
 
virtual ~AgentOperDBEntry ()
 
IFMapNodeifmap_node () const
 
void SetIFMapNodeState (IFMapDependencyManager::IFMapNodePtr sref)
 
- Public Member Functions inherited from AgentDBEntry
 AgentDBEntry ()
 
virtual ~AgentDBEntry ()
 
void SetRefState () const
 
void ClearRefState () const
 
bool IsActive () const
 
DBStateGetAgentDBEntryState (int listener_id)
 
const DBStateGetAgentDBEntryState (int listener_id) const
 
virtual void AllocateResources (ResourceManager *resource_manager)
 
virtual void FreeResources (ResourceManager *resource_manager)
 
- Public Member Functions inherited from DBEntry
 DBEntry ()
 
virtual ~DBEntry ()
 
bool operator< (const DBEntry &rhs) const
 
- Public Member Functions inherited from DBEntryBase
 DBEntryBase ()
 
virtual ~DBEntryBase ()
 
virtual bool IsMoreSpecific (const std::string &match) const
 
virtual bool IsLessSpecific (const std::string &match) const
 
void SetState (DBTableBase *tbl_base, ListenerId listener, DBState *state)
 
void ClearState (DBTableBase *tbl_base, ListenerId listener)
 
DBStateGetState (DBTableBase *tbl_base, ListenerId listener) const
 
const DBStateGetState (const DBTableBase *tbl_base, ListenerId listener) const
 
bool is_state_empty (DBTablePartBase *tpart)
 
bool is_state_empty_unlocked (DBTablePartBase *tpart)
 
void Delete ()
 
void MarkDelete ()
 
void ClearDelete ()
 
bool IsDeleted () const
 
void set_onlist ()
 
void clear_onlist ()
 
bool is_onlist ()
 
void SetOnRemoveQ ()
 
bool IsOnRemoveQ ()
 
void ClearOnRemoveQ ()
 
void set_last_change_at (uint64_t time)
 
void set_last_change_at_to_now ()
 
const uint64_t last_change_at () const
 
const std::string last_change_at_str () const
 
void set_last_update_at (uint64_t time)
 
void set_last_update_at_to_now ()
 
const uint64_t last_update_at () const
 
DBTablePartBaseget_table_partition () const
 
void set_table_partition (DBTablePartBase *tpart)
 
DBTableBaseget_table () const
 
void Notify ()
 

Static Public Member Functions

static void Create (InterfaceTable *table, const std::string &ifname, SubType sub_type, const std::string &vrf_name, const Ip4Address &addr, int plen, const Ip4Address &gw, const std::string &xconnect, const std::string &vn_name, Interface::Transport transport)
 
static void CreateReq (InterfaceTable *table, const std::string &ifname, SubType sub_type, const std::string &vrf_name, const Ip4Address &addr, int plen, const Ip4Address &gw, const std::string &xconnect, const std::string &vn_name, Interface::Transport transport)
 
static void Delete (InterfaceTable *table, const std::string &ifname)
 
static void DeleteReq (InterfaceTable *table, const std::string &ifname)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (InetInterface)
 

Private Attributes

SubType sub_type_
 
Ip4Address ip_addr_
 
int plen_
 
Ip4Address gw_
 
InterfaceRef xconnect_
 
std::string vn_name_
 

Additional Inherited Members

- Public Attributes inherited from DBEntryBase
boost::intrusive::list_member_hook chg_list_
 
- Static Public Attributes inherited from Interface
static const uint32_t kInvalidIndex = 0xFFFFFFFF
 
- Protected Member Functions inherited from Interface
void SetItfSandeshData (ItfSandeshData &data) const
 
virtual void ObtainOsSpecificParams (const std::string &name, Agent *agent)
 
- Protected Attributes inherited from Interface
Type type_
 
boost::uuids::uuid uuid_
 
VrfEntryRef vrf_
 
uint32_t label_
 
uint32_t l2_label_
 
bool ipv4_active_
 
bool ipv6_active_
 
bool is_hc_active_
 
bool metadata_ip_active_
 
bool metadata_l2_active_
 
bool l2_active_
 
size_t id_
 
bool dhcp_enabled_
 
bool dhcp_enabled_v6_
 
bool dns_enabled_
 
bool admin_state_
 
bool test_oper_state_
 
NextHopConstRef flow_key_nh_
 
Transport transport_
 
AgentQosConfigConstRef qos_config_
 
struct InterfaceOsParams os_params_
 
boost::uuids::uuid logical_router_uuid_
 

Detailed Description

Definition at line 19 of file inet_interface.h.

Member Enumeration Documentation

Enumerator
VHOST 
LINK_LOCAL 
SIMPLE_GATEWAY 

Definition at line 21 of file inet_interface.h.

Constructor & Destructor Documentation

InetInterface::InetInterface ( const std::string &  name)

Definition at line 347 of file inet_interface.cc.

InetInterface::InetInterface ( const std::string &  name,
SubType  sub_type,
VrfEntry vrf,
const Ip4Address ip_addr,
int  plen,
const Ip4Address gw,
Interface xconnect,
const std::string &  vn_name 
)

Definition at line 355 of file inet_interface.cc.

virtual InetInterface::~InetInterface ( )
inlinevirtual

Definition at line 31 of file inet_interface.h.

Member Function Documentation

void InetInterface::Activate ( )

Definition at line 380 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::ActivateHostInterface ( )

Definition at line 296 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::ActivateSimpleGateway ( )

Definition at line 100 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::AddHostMulticastRoutes ( )

Definition at line 244 of file inet_interface.cc.

Here is the call graph for this function:

bool InetInterface::CmpInterface ( const DBEntry rhs) const
virtual

Implements Interface.

Definition at line 370 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::Create ( InterfaceTable table,
const std::string &  ifname,
SubType  sub_type,
const std::string &  vrf_name,
const Ip4Address addr,
int  plen,
const Ip4Address gw,
const std::string &  xconnect,
const std::string &  vn_name,
Interface::Transport  transport 
)
static

Definition at line 498 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::CreateReq ( InterfaceTable table,
const std::string &  ifname,
SubType  sub_type,
const std::string &  vrf_name,
const Ip4Address addr,
int  plen,
const Ip4Address gw,
const std::string &  xconnect,
const std::string &  vn_name,
Interface::Transport  transport 
)
static

Definition at line 482 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::DeActivate ( )

Definition at line 391 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::DeActivateHostInterface ( )

Definition at line 322 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::DeActivateSimpleGateway ( )

Definition at line 119 of file inet_interface.cc.

Here is the call graph for this function:

bool InetInterface::Delete ( const DBRequest req)
virtual

Reimplemented from Interface.

Definition at line 401 of file inet_interface.cc.

Here is the call graph for this function:

static void InetInterface::Delete ( InterfaceTable table,
const std::string &  ifname 
)
static
void InetInterface::DeleteReq ( InterfaceTable table,
const std::string &  ifname 
)
static

Definition at line 514 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::DelHostMulticastRoutes ( )

Definition at line 272 of file inet_interface.cc.

Here is the call graph for this function:

InetInterface::DISALLOW_COPY_AND_ASSIGN ( InetInterface  )
private
DBEntryBase::KeyPtr InetInterface::GetDBRequestKey ( ) const
virtual

Implements Interface.

Definition at line 375 of file inet_interface.cc.

Here is the call graph for this function:

const Ip4Address& InetInterface::ip_addr ( ) const
inline

Definition at line 40 of file inet_interface.h.

bool InetInterface::OnChange ( InetInterfaceData data)

Definition at line 414 of file inet_interface.cc.

Here is the call graph for this function:

void InetInterface::PostAdd ( )
virtual

Reimplemented from AgentDBEntry.

Definition at line 410 of file inet_interface.cc.

Here is the call graph for this function:

SubType InetInterface::sub_type ( ) const
inline

Definition at line 39 of file inet_interface.h.

std::string InetInterface::ToString ( ) const
inlinevirtual

Implements DBEntryBase.

Definition at line 35 of file inet_interface.h.

Here is the call graph for this function:

Interface* InetInterface::xconnect ( ) const
inline

Definition at line 41 of file inet_interface.h.

Member Data Documentation

Ip4Address InetInterface::gw_
private

Definition at line 75 of file inet_interface.h.

Ip4Address InetInterface::ip_addr_
private

Definition at line 73 of file inet_interface.h.

int InetInterface::plen_
private

Definition at line 74 of file inet_interface.h.

SubType InetInterface::sub_type_
private

Definition at line 72 of file inet_interface.h.

std::string InetInterface::vn_name_
private

Definition at line 77 of file inet_interface.h.

InterfaceRef InetInterface::xconnect_
private

Definition at line 76 of file inet_interface.h.


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