NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
network-monitor-impl-rtnl.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22 #ifndef NDN_UTIL_NETWORK_MONITOR_IMPL_RTNL_HPP
23 #define NDN_UTIL_NETWORK_MONITOR_IMPL_RTNL_HPP
24 
25 #include "../network-monitor.hpp"
26 
27 #include <boost/asio/posix/stream_descriptor.hpp>
28 
29 namespace ndn {
30 namespace util {
31 
32 const size_t NETLINK_BUFFER_SIZE = 4096;
33 
35 {
36 public:
37  Impl(NetworkMonitor& nm, boost::asio::io_service& io);
38 
39 private:
40  void
41  onReceiveRtNetlink(const boost::system::error_code& error, size_t nBytesReceived);
42 
43 private:
44  NetworkMonitor& m_nm;
45 
46  uint8_t m_buffer[NETLINK_BUFFER_SIZE];
47  boost::asio::posix::stream_descriptor m_socket;
48 };
49 
50 } // namespace util
51 } // namespace ndn
52 
53 #endif // NDN_UTIL_NETWORK_MONITOR_IMPL_RTNL_HPP
Impl(NetworkMonitor &nm, boost::asio::io_service &io)
Copyright (c) 2011-2015 Regents of the University of California.
Network state change monitor.
const size_t NETLINK_BUFFER_SIZE