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

#include <vnswif_listener_base.h>

Inheritance diagram for VnswInterfaceListenerBase:
Collaboration diagram for VnswInterfaceListenerBase:

Classes

struct  Event
 
struct  HostInterfaceEntry
 
class  IpSubnet
 
class  VnDBState
 

Public Types

enum  bond_intf_type { VR_FABRIC = 1, VR_BOND_SLAVES }
 

Public Member Functions

bool AddIpam (const Ip4Address &ip, uint8_t plen)
 
bool DelIpam (const Ip4Address &ip, uint8_t plen)
 
Agentagent ()
 
 VnswInterfaceListenerBase (Agent *agent)
 
virtual ~VnswInterfaceListenerBase ()
 
void Init ()
 
void Shutdown ()
 
bool IsValidLinkLocalAddress (const Ip4Address &addr) const
 
void Enqueue (Event *event)
 
uint32_t GetHostInterfaceCount () const
 
HostInterfaceEntryGetHostInterfaceEntry (const std::string &name)
 
uint32_t vhost_update_count () const
 
uint32_t ll_add_count () const
 
uint32_t ll_del_count () const
 
bool IsHostLinkStateUp (const std::string &name) const
 

Static Public Attributes

static const int kVnswRtmProto = 109
 
static const uint32_t kMaxBufferSize = 4096
 

Protected Types

typedef std::map< std::string,
HostInterfaceEntry * > 
HostInterfaceTable
 
typedef std::set< Ip4AddressLinkLocalAddressTable
 
typedef std::map< IpSubnet,
uint32_t > 
IpamSubnetMap
 

Protected Member Functions

void InterfaceNotify (DBTablePartBase *part, DBEntryBase *e)
 
void FabricRouteNotify (DBTablePartBase *part, DBEntryBase *e)
 
void VnNotify (DBTablePartBase *part, DBEntryBase *e)
 
virtual int CreateSocket ()=0
 
virtual void SyncCurrentState ()=0
 
virtual void RegisterAsyncReadHandler ()=0
 
virtual void UpdateLinkLocalRoute (const Ip4Address &addr, uint8_t plen, bool del_rt)=0
 
bool ProcessEvent (Event *re)
 
virtual void UpdateLinkLocalRouteAndCount (const Ip4Address &addr, uint8_t plen, bool del_rt)
 
void LinkLocalRouteFromLinkLocalEvent (Event *event)
 
void LinkLocalRouteFromRouteEvent (Event *event)
 
void AddLinkLocalRoutes ()
 
void DelLinkLocalRoutes ()
 
void AddIpamRoutes ()
 
void SetSeen (const std::string &name, bool oper, uint32_t oper_idx)
 
void ResetSeen (const std::string &name, bool oper)
 
void Activate (const std::string &name, const HostInterfaceEntry *entry)
 
void DeActivate (const std::string &name, const HostInterfaceEntry *entry)
 
void SetLinkState (const std::string &name, bool link_up)
 
bool IsInterfaceActive (const HostInterfaceEntry *entry)
 
void HandleInterfaceEvent (const Event *event)
 
void SetAddress (const Event *event)
 
void ResetAddress (const Event *event)
 
void HandleAddressEvent (const Event *event)
 
 DISALLOW_COPY_AND_ASSIGN (VnswInterfaceListenerBase)
 

Protected Attributes

Agentagent_
 
uint8_t * read_buf_
 
uint8_t tx_buf_ [kMaxBufferSize]
 
DBTableBase::ListenerId intf_listener_id_
 
DBTableBase::ListenerId fabric_listener_id_
 
DBTableBase::ListenerId vn_listener_id_
 
int seqno_
 
bool vhost_intf_up_
 
LinkLocalAddressTable ll_addr_table_
 
HostInterfaceTable host_interface_table_
 
WorkQueue< Event * > * revent_queue_
 
uint32_t vhost_update_count_
 
uint32_t ll_add_count_
 
uint32_t ll_del_count_
 
IpamSubnetMap ipam_subnet_
 

Friends

class TestVnswIf
 
class VHostMultiHomeTest
 

Detailed Description

Definition at line 33 of file vnswif_listener_base.h.

Member Typedef Documentation

typedef std::map<std::string, HostInterfaceEntry *> VnswInterfaceListenerBase::HostInterfaceTable
protected

Definition at line 167 of file vnswif_listener_base.h.

typedef std::map<IpSubnet, uint32_t> VnswInterfaceListenerBase::IpamSubnetMap
protected

Definition at line 169 of file vnswif_listener_base.h.

Definition at line 168 of file vnswif_listener_base.h.

Member Enumeration Documentation

Enumerator
VR_FABRIC 
VR_BOND_SLAVES 

Definition at line 90 of file vnswif_listener_base.h.

Constructor & Destructor Documentation

VnswInterfaceListenerBase::VnswInterfaceListenerBase ( Agent agent)

Definition at line 31 of file vnswif_listener_base.cc.

VnswInterfaceListenerBase::~VnswInterfaceListenerBase ( )
virtual

Definition at line 39 of file vnswif_listener_base.cc.

Member Function Documentation

void VnswInterfaceListenerBase::Activate ( const std::string &  name,
const HostInterfaceEntry entry 
)
protected

Definition at line 300 of file vnswif_listener_base.cc.

Here is the call graph for this function:

bool VnswInterfaceListenerBase::AddIpam ( const Ip4Address ip,
uint8_t  plen 
)
inline

Definition at line 137 of file vnswif_listener_base.h.

void VnswInterfaceListenerBase::AddIpamRoutes ( )
protected

Definition at line 614 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::AddLinkLocalRoutes ( )
protected

Definition at line 604 of file vnswif_listener_base.cc.

Here is the call graph for this function:

Agent* VnswInterfaceListenerBase::agent ( )
inline

Definition at line 163 of file vnswif_listener_base.h.

virtual int VnswInterfaceListenerBase::CreateSocket ( )
protectedpure virtual
void VnswInterfaceListenerBase::DeActivate ( const std::string &  name,
const HostInterfaceEntry entry 
)
protected

Definition at line 315 of file vnswif_listener_base.cc.

Here is the call graph for this function:

bool VnswInterfaceListenerBase::DelIpam ( const Ip4Address ip,
uint8_t  plen 
)
inline

Definition at line 148 of file vnswif_listener_base.h.

void VnswInterfaceListenerBase::DelLinkLocalRoutes ( )
protected

Definition at line 611 of file vnswif_listener_base.cc.

VnswInterfaceListenerBase::DISALLOW_COPY_AND_ASSIGN ( VnswInterfaceListenerBase  )
protected
void VnswInterfaceListenerBase::Enqueue ( Event event)

Definition at line 84 of file vnswif_listener_base.cc.

void VnswInterfaceListenerBase::FabricRouteNotify ( DBTablePartBase part,
DBEntryBase e 
)
protected

Definition at line 134 of file vnswif_listener_base.cc.

Here is the call graph for this function:

uint32_t VnswInterfaceListenerBase::GetHostInterfaceCount ( ) const
inline

Definition at line 179 of file vnswif_listener_base.h.

VnswInterfaceListenerBase::HostInterfaceEntry * VnswInterfaceListenerBase::GetHostInterfaceEntry ( const std::string &  name)

Definition at line 292 of file vnswif_listener_base.cc.

void VnswInterfaceListenerBase::HandleAddressEvent ( const Event event)
protected

Definition at line 507 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::HandleInterfaceEvent ( const Event event)
protected

Definition at line 381 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::Init ( )

Definition at line 54 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::InterfaceNotify ( DBTablePartBase part,
DBEntryBase e 
)
protected

Definition at line 91 of file vnswif_listener_base.cc.

Here is the call graph for this function:

bool VnswInterfaceListenerBase::IsHostLinkStateUp ( const std::string &  name) const
inline

Definition at line 190 of file vnswif_listener_base.h.

bool VnswInterfaceListenerBase::IsInterfaceActive ( const HostInterfaceEntry entry)
protected

Definition at line 252 of file vnswif_listener_base.cc.

bool VnswInterfaceListenerBase::IsValidLinkLocalAddress ( const Ip4Address addr) const

Definition at line 478 of file vnswif_listener_base.cc.

void VnswInterfaceListenerBase::LinkLocalRouteFromLinkLocalEvent ( Event event)
protected

Definition at line 564 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::LinkLocalRouteFromRouteEvent ( Event event)
protected

Definition at line 580 of file vnswif_listener_base.cc.

Here is the call graph for this function:

uint32_t VnswInterfaceListenerBase::ll_add_count ( ) const
inline

Definition at line 187 of file vnswif_listener_base.h.

uint32_t VnswInterfaceListenerBase::ll_del_count ( ) const
inline

Definition at line 188 of file vnswif_listener_base.h.

bool VnswInterfaceListenerBase::ProcessEvent ( Event re)
protected

Definition at line 644 of file vnswif_listener_base.cc.

Here is the call graph for this function:

virtual void VnswInterfaceListenerBase::RegisterAsyncReadHandler ( )
protectedpure virtual
void VnswInterfaceListenerBase::ResetAddress ( const Event event)
protected

Definition at line 497 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::ResetSeen ( const std::string &  name,
bool  oper 
)
protected

Definition at line 341 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::SetAddress ( const Event event)
protected

Definition at line 486 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::SetLinkState ( const std::string &  name,
bool  link_up 
)
protected

Definition at line 367 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::SetSeen ( const std::string &  name,
bool  oper,
uint32_t  oper_idx 
)
protected

Definition at line 323 of file vnswif_listener_base.cc.

Here is the call graph for this function:

void VnswInterfaceListenerBase::Shutdown ( void  )

Definition at line 74 of file vnswif_listener_base.cc.

Here is the call graph for this function:

virtual void VnswInterfaceListenerBase::SyncCurrentState ( )
protectedpure virtual
virtual void VnswInterfaceListenerBase::UpdateLinkLocalRoute ( const Ip4Address addr,
uint8_t  plen,
bool  del_rt 
)
protectedpure virtual
void VnswInterfaceListenerBase::UpdateLinkLocalRouteAndCount ( const Ip4Address addr,
uint8_t  plen,
bool  del_rt 
)
protectedvirtual

Reimplemented in VnswInterfaceListenerBaseNix.

Definition at line 554 of file vnswif_listener_base.cc.

uint32_t VnswInterfaceListenerBase::vhost_update_count ( ) const
inline

Definition at line 185 of file vnswif_listener_base.h.

void VnswInterfaceListenerBase::VnNotify ( DBTablePartBase part,
DBEntryBase e 
)
protected

Definition at line 228 of file vnswif_listener_base.cc.

Here is the call graph for this function:

Friends And Related Function Documentation

friend class TestVnswIf
friend

Definition at line 199 of file vnswif_listener_base.h.

friend class VHostMultiHomeTest
friend

Definition at line 200 of file vnswif_listener_base.h.

Member Data Documentation

Agent* VnswInterfaceListenerBase::agent_
protected

Definition at line 234 of file vnswif_listener_base.h.

DBTableBase::ListenerId VnswInterfaceListenerBase::fabric_listener_id_
protected

Definition at line 239 of file vnswif_listener_base.h.

HostInterfaceTable VnswInterfaceListenerBase::host_interface_table_
protected

Definition at line 245 of file vnswif_listener_base.h.

DBTableBase::ListenerId VnswInterfaceListenerBase::intf_listener_id_
protected

Definition at line 238 of file vnswif_listener_base.h.

IpamSubnetMap VnswInterfaceListenerBase::ipam_subnet_
protected

Definition at line 251 of file vnswif_listener_base.h.

const uint32_t VnswInterfaceListenerBase::kMaxBufferSize = 4096
static

Definition at line 36 of file vnswif_listener_base.h.

const int VnswInterfaceListenerBase::kVnswRtmProto = 109
static

Definition at line 35 of file vnswif_listener_base.h.

uint32_t VnswInterfaceListenerBase::ll_add_count_
protected

Definition at line 249 of file vnswif_listener_base.h.

LinkLocalAddressTable VnswInterfaceListenerBase::ll_addr_table_
protected

Definition at line 244 of file vnswif_listener_base.h.

uint32_t VnswInterfaceListenerBase::ll_del_count_
protected

Definition at line 250 of file vnswif_listener_base.h.

uint8_t* VnswInterfaceListenerBase::read_buf_
protected

Definition at line 235 of file vnswif_listener_base.h.

WorkQueue<Event *>* VnswInterfaceListenerBase::revent_queue_
protected

Definition at line 246 of file vnswif_listener_base.h.

int VnswInterfaceListenerBase::seqno_
protected

Definition at line 241 of file vnswif_listener_base.h.

uint8_t VnswInterfaceListenerBase::tx_buf_[kMaxBufferSize]
protected

Definition at line 236 of file vnswif_listener_base.h.

bool VnswInterfaceListenerBase::vhost_intf_up_
protected

Definition at line 242 of file vnswif_listener_base.h.

uint32_t VnswInterfaceListenerBase::vhost_update_count_
protected

Definition at line 248 of file vnswif_listener_base.h.

DBTableBase::ListenerId VnswInterfaceListenerBase::vn_listener_id_
protected

Definition at line 240 of file vnswif_listener_base.h.


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