OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vnswif_listener.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
3  */
4 
5 #ifndef linux_vnsw_agent_router_id_h
6 #define linux_vnsw_agent_router_id_h
7 
8 #include <string>
9 #include <boost/bind.hpp>
10 #include <boost/function.hpp>
11 #include <boost/asio.hpp>
13 
14 namespace local = boost::asio::local;
15 
17 
18 public:
21 
22 private:
23  friend class TestVnswIf;
24 
25  int CreateSocket();
26  virtual void SyncCurrentState();
27  virtual void RegisterAsyncReadHandler();
28  void ReadHandler(const boost::system::error_code &, std::size_t length);
29  void UpdateLinkLocalRoute(const Ip4Address &addr, uint8_t plen, bool del_rt);
30 
31 private:
32  void InitNetlinkScan(uint32_t type, uint32_t seqno);
33  int NlMsgDecode(struct nlmsghdr *nl, std::size_t len, uint32_t seq_no);
34  bool ProcessEvent(Event *re);
35 
36  int AddAttr(uint8_t *, int , void *, int );
37  string NetlinkTypeToString(uint32_t);
38  Event *HandleNetlinkRouteMsg(struct nlmsghdr *);
39  Event *HandleNetlinkIntfMsg(struct nlmsghdr *);
40  Event *HandleNetlinkAddrMsg(struct nlmsghdr *);
41 
43 };
44 
46 
47 #endif
int NlMsgDecode(struct nlmsghdr *nl, std::size_t len, uint32_t seq_no)
Event * HandleNetlinkAddrMsg(struct nlmsghdr *)
bool ProcessEvent(Event *re)
DISALLOW_COPY_AND_ASSIGN(VnswInterfaceListenerLinux)
int AddAttr(uint8_t *, int, void *, int)
void ReadHandler(const boost::system::error_code &, std::size_t length)
void InitNetlinkScan(uint32_t type, uint32_t seqno)
uint8_t type
Definition: load_balance.h:109
Definition: agent.h:358
Event * HandleNetlinkIntfMsg(struct nlmsghdr *)
VnswInterfaceListenerLinux(Agent *agent)
void UpdateLinkLocalRoute(const Ip4Address &addr, uint8_t plen, bool del_rt)
VnswInterfaceListenerLinux VnswInterfaceListener
boost::asio::ip::address_v4 Ip4Address
Definition: address.h:14
string NetlinkTypeToString(uint32_t)
virtual void RegisterAsyncReadHandler()
Event * HandleNetlinkRouteMsg(struct nlmsghdr *)