5 #ifndef vnsw_agent_contrail_pkt0_interface_hpp
6 #define vnsw_agent_contrail_pkt0_interface_hpp
9 #include <boost/bind.hpp>
10 #include <boost/function.hpp>
11 #include <boost/asio.hpp>
20 Pkt0Interface(
const std::string &name, boost::asio::io_context *io);
36 void ReadHandler(
const boost::system::error_code &err, std::size_t length);
37 void WriteHandler(
const boost::system::error_code &error,
38 std::size_t length, uint8_t *buff);
44 boost::asio::posix::stream_descriptor
input_;
71 boost::asio::io_context *io);
82 void ReadHandler(
const boost::system::error_code &err, std::size_t length);
83 void WriteHandler(
const boost::system::error_code &error,
90 boost::asio::local::datagram_protocol::socket
socket_;
98 #endif // vnsw_agent_contrail_pkt0_interface_hpp
boost::shared_ptr< PacketBuffer > PacketBufferPtr
Pkt0RawInterface(const std::string &name, boost::asio::io_context *io)
void InitControlInterface()
static string sVrouterSocketPath
virtual ~Pkt0RawInterface()
Pkt0Interface(const std::string &name, boost::asio::io_context *io)
void WriteHandler(const boost::system::error_code &error, std::size_t length, uint8_t *buff)
unsigned char mac_address_[ETHER_ADDR_LEN]
const unsigned char * mac_address() const
boost::asio::local::datagram_protocol::socket socket_
DISALLOW_COPY_AND_ASSIGN(Pkt0Interface)
virtual void IoShutdownControlInterface()
boost::scoped_ptr< Timer > timer_
static const uint32_t kConnectTimeout
virtual void IoShutdownControlInterface()
static void CreateMockAgent(const string &)
virtual void InitControlInterface()
DISALLOW_COPY_AND_ASSIGN(Pkt0Socket)
void ReadHandler(const boost::system::error_code &err, std::size_t length)
DISALLOW_COPY_AND_ASSIGN(Pkt0RawInterface)
PktHandler * pkt_handler_
virtual void ShutdownControlInterface()
boost::asio::posix::stream_descriptor input_
std::vector< boost::asio::const_buffer > buffer_list
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 SendImpl(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt, buffer_list &buff_list)
static string sAgentSocketPath
const std::string & Name() const
int Send(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt)
int Send(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt)
Pkt0Socket(const std::string &name, boost::asio::io_context *io)
PktHandler * pkt_handler_
virtual void ShutdownControlInterface()
virtual void InitControlInterface()
const std::string & Name() const