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

#include <pkt0_interface.h>

Inheritance diagram for Pkt0Socket:
Collaboration diagram for Pkt0Socket:

Public Member Functions

 Pkt0Socket (const std::string &name, boost::asio::io_context *io)
 
 ~Pkt0Socket ()
 
virtual void InitControlInterface ()
 
virtual void IoShutdownControlInterface ()
 
virtual void ShutdownControlInterface ()
 
const std::string & Name () const
 
int Send (uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt)
 
- Public Member Functions inherited from VrouterControlInterface
 VrouterControlInterface ()
 
virtual ~VrouterControlInterface ()
 
virtual uint32_t EncapsulationLength () const
 
int DecodeAgentHdr (AgentHdr *hdr, uint8_t *buff, uint32_t len)
 
bool Process (const PacketBufferPtr &pkt)
 
int EncodeAgentHdr (uint8_t *buff, const AgentHdr &hdr)
 
virtual int Send (const AgentHdr &hdr, const PacketBufferPtr &pkt)
 
- Public Member Functions inherited from ControlInterface
 ControlInterface ()
 
virtual ~ControlInterface ()
 
void Init (PktHandler *pkt_handler)
 
void Shutdown ()
 
void IoShutdown ()
 
bool Process (const AgentHdr &hdr, const PacketBufferPtr &pkt)
 
PktHandlerpkt_handler () const
 

Static Public Member Functions

static void CreateMockAgent (const string &)
 

Static Public Attributes

static const uint32_t kConnectTimeout = 1000
 
static string sSocketDir = "/var/run/vrouter"
 
static string sAgentSocketPath = "/var/run/vrouter/agent_pkt0"
 
static string sVrouterSocketPath = "/var/run/vrouter/dpdk_pkt0"
 
- Static Public Attributes inherited from VrouterControlInterface
static const uint32_t kAgentHdrLen
 
- Static Public Attributes inherited from ControlInterface
static const uint32_t kMaxPacketSize = 9060
 

Private Member Functions

void AsyncRead ()
 
void ReadHandler (const boost::system::error_code &err, std::size_t length)
 
void WriteHandler (const boost::system::error_code &error, std::size_t length, PacketBufferPtr pkt, uint8_t *buff)
 
void CreateUnixSocket ()
 
void StartConnectTimer ()
 
bool OnTimeout ()
 
 DISALLOW_COPY_AND_ASSIGN (Pkt0Socket)
 

Private Attributes

bool connected_
 
boost::asio::local::datagram_protocol::socket socket_
 
boost::scoped_ptr< Timertimer_
 
uint8_t * read_buff_
 
PktHandlerpkt_handler_
 
std::string name_
 

Detailed Description

Definition at line 62 of file pkt0_interface.h.

Constructor & Destructor Documentation

Pkt0Socket::Pkt0Socket ( const std::string &  name,
boost::asio::io_context *  io 
)

Definition at line 129 of file pkt0_interface_base.cc.

Pkt0Socket::~Pkt0Socket ( )

Definition at line 135 of file pkt0_interface_base.cc.

Member Function Documentation

void Pkt0Socket::AsyncRead ( )
private

Definition at line 181 of file pkt0_interface_base.cc.

Here is the call graph for this function:

void Pkt0Socket::CreateMockAgent ( const string &  )
static

Definition at line 36 of file pkt0_interface_base.cc.

void Pkt0Socket::CreateUnixSocket ( )
private

Definition at line 141 of file pkt0_interface_base.cc.

Pkt0Socket::DISALLOW_COPY_AND_ASSIGN ( Pkt0Socket  )
private
void Pkt0Socket::InitControlInterface ( )
virtual

Reimplemented from VrouterControlInterface.

Definition at line 162 of file pkt0_interface_base.cc.

Here is the call graph for this function:

void Pkt0Socket::IoShutdownControlInterface ( )
virtual

Implements ControlInterface.

Definition at line 169 of file pkt0_interface_base.cc.

const std::string& Pkt0Socket::Name ( ) const
inlinevirtual

Implements ControlInterface.

Definition at line 77 of file pkt0_interface.h.

bool Pkt0Socket::OnTimeout ( )
private

Definition at line 203 of file pkt0_interface_base.cc.

void Pkt0Socket::ReadHandler ( const boost::system::error_code &  err,
std::size_t  length 
)
private

Definition at line 236 of file pkt0_interface_base.cc.

Here is the call graph for this function:

int Pkt0Socket::Send ( uint8_t *  buff,
uint16_t  buff_len,
const PacketBufferPtr pkt 
)
virtual

Implements VrouterControlInterface.

Definition at line 217 of file pkt0_interface_base.cc.

Here is the call graph for this function:

void Pkt0Socket::ShutdownControlInterface ( )
virtual

Implements ControlInterface.

Definition at line 178 of file pkt0_interface_base.cc.

void Pkt0Socket::StartConnectTimer ( )
private

Definition at line 190 of file pkt0_interface_base.cc.

Here is the call graph for this function:

void Pkt0Socket::WriteHandler ( const boost::system::error_code &  error,
std::size_t  length,
PacketBufferPtr  pkt,
uint8_t *  buff 
)
private

Definition at line 260 of file pkt0_interface_base.cc.

Here is the call graph for this function:

Member Data Documentation

bool Pkt0Socket::connected_
private

Definition at line 88 of file pkt0_interface.h.

const uint32_t Pkt0Socket::kConnectTimeout = 1000
static

Definition at line 64 of file pkt0_interface.h.

std::string Pkt0Socket::name_
private

Definition at line 95 of file pkt0_interface.h.

PktHandler* Pkt0Socket::pkt_handler_
private

Definition at line 94 of file pkt0_interface.h.

uint8_t* Pkt0Socket::read_buff_
private

Definition at line 93 of file pkt0_interface.h.

string Pkt0Socket::sAgentSocketPath = "/var/run/vrouter/agent_pkt0"
static

Definition at line 66 of file pkt0_interface.h.

boost::asio::local::datagram_protocol::socket Pkt0Socket::socket_
private

Definition at line 90 of file pkt0_interface.h.

string Pkt0Socket::sSocketDir = "/var/run/vrouter"
static

Definition at line 65 of file pkt0_interface.h.

string Pkt0Socket::sVrouterSocketPath = "/var/run/vrouter/dpdk_pkt0"
static

Definition at line 67 of file pkt0_interface.h.

boost::scoped_ptr<Timer> Pkt0Socket::timer_
private

Definition at line 92 of file pkt0_interface.h.


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