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>
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_;
virtual void InitControlInterface()
virtual void ShutdownControlInterface()
void WriteHandler(const boost::system::error_code &error, std::size_t length, uint8_t *buff)
int Send(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt)
unsigned char mac_address_[ETHER_ADDR_LEN]
std::vector< boost::asio::const_buffer > buffer_list
Pkt0Interface(const std::string &name, boost::asio::io_context *io)
void ReadHandler(const boost::system::error_code &err, std::size_t length)
const unsigned char * mac_address() const
const std::string & Name() const
void SendImpl(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt, buffer_list &buff_list)
PktHandler * pkt_handler_
boost::asio::posix::stream_descriptor input_
DISALLOW_COPY_AND_ASSIGN(Pkt0Interface)
virtual void IoShutdownControlInterface()
void InitControlInterface()
DISALLOW_COPY_AND_ASSIGN(Pkt0RawInterface)
Pkt0RawInterface(const std::string &name, boost::asio::io_context *io)
virtual ~Pkt0RawInterface()
void ReadHandler(const boost::system::error_code &err, std::size_t length)
static const uint32_t kConnectTimeout
virtual void InitControlInterface()
static string sVrouterSocketPath
static void CreateMockAgent(const string &)
PktHandler * pkt_handler_
boost::scoped_ptr< Timer > timer_
virtual void ShutdownControlInterface()
int Send(uint8_t *buff, uint16_t buff_len, const PacketBufferPtr &pkt)
void WriteHandler(const boost::system::error_code &error, std::size_t length, PacketBufferPtr pkt, uint8_t *buff)
virtual void IoShutdownControlInterface()
boost::asio::local::datagram_protocol::socket socket_
Pkt0Socket(const std::string &name, boost::asio::io_context *io)
const std::string & Name() const
static string sAgentSocketPath
DISALLOW_COPY_AND_ASSIGN(Pkt0Socket)
boost::shared_ptr< PacketBuffer > PacketBufferPtr