24 #ifndef NDN_NET_NETLINK_SOCKET_HPP 25 #define NDN_NET_NETLINK_SOCKET_HPP 30 #include <boost/asio/posix/stream_descriptor.hpp> 34 #ifndef NDN_CXX_HAVE_NETLINK 35 #error "This file should not be included ..." 78 shared_ptr<boost::asio::posix::stream_descriptor>
m_sock;
83 std::vector<uint8_t> m_buffer;
84 std::map<uint32_t, MessageCallback> m_pendingRequests;
123 std::string m_family;
136 sendRequest(
const std::string& familyName, uint8_t command,
137 const void* payload,
size_t payloadLen,
142 const void* payload,
size_t payloadLen,
150 std::map<std::string, uint16_t> m_cachedFamilyIds;
151 std::map<std::string, GenlFamilyResolver> m_familyResolvers;
157 #endif // NDN_NET_NETLINK_SOCKET_HPP Copyright (c) 2011-2015 Regents of the University of California.
util::Signal< GenlFamilyResolver > onError
RtnlSocket(boost::asio::io_service &io)
provides a lightweight signal / event system
std::string nlmsgTypeToString(uint16_t type) const final
void sendRequest(const std::string &familyName, uint8_t command, const void *payload, size_t payloadLen, MessageCallback messageCb, std::function< void()> errorCb)
uint32_t m_seqNum
sequence number of the last netlink request sent to the kernel
void sendDumpRequest(uint16_t nlmsgType, MessageCallback cb)
std::string nlmsgTypeToString(uint16_t type) const final
void registerRequestCallback(uint32_t seq, MessageCallback cb)
GenlSocket(boost::asio::io_service &io)
shared_ptr< boost::asio::posix::stream_descriptor > m_sock
netlink socket descriptor
void registerNotificationCallback(MessageCallback cb)
void joinGroup(int group)
NetlinkSocket(boost::asio::io_service &io)
std::function< void(const NetlinkMessage &)> MessageCallback
virtual std::string nlmsgTypeToString(uint16_t type) const
uint32_t m_pid
port ID of this socket
util::Signal< GenlFamilyResolver, uint16_t > onResolved
GenlFamilyResolver(std::string familyName, GenlSocket &socket)