#include <netlink-socket.hpp>
Public Member Functions | |
GenlSocket (boost::asio::io_service &io) | |
void | open () |
void | sendRequest (const std::string &familyName, uint8_t command, const void *payload, size_t payloadLen, MessageCallback messageCb, std::function< void()> errorCb) |
void | sendRequest (uint16_t familyId, uint8_t command, const void *payload, size_t payloadLen, MessageCallback messageCb) |
Public Member Functions inherited from ndn::net::NetlinkSocket | |
void | joinGroup (int group) |
void | registerNotificationCallback (MessageCallback cb) |
Protected Member Functions | |
std::string | nlmsgTypeToString (uint16_t type) const final |
Protected Member Functions inherited from ndn::net::NetlinkSocket | |
NetlinkSocket (boost::asio::io_service &io) | |
~NetlinkSocket () | |
void | open (int protocol) |
void | registerRequestCallback (uint32_t seq, MessageCallback cb) |
Additional Inherited Members | |
Public Types inherited from ndn::net::NetlinkSocket | |
using | Error = NetworkMonitor::Error |
using | MessageCallback = std::function< void(const NetlinkMessage &)> |
Protected Attributes inherited from ndn::net::NetlinkSocket | |
shared_ptr< boost::asio::generic::raw_protocol::socket > | m_sock |
netlink socket descriptor More... | |
uint32_t | m_pid |
port ID of this socket More... | |
uint32_t | m_seqNum |
sequence number of the last netlink request sent to the kernel More... | |
Definition at line 128 of file netlink-socket.hpp.
|
explicit |
Definition at line 419 of file netlink-socket.cpp.
void ndn::net::GenlSocket::open | ( | ) |
Definition at line 426 of file netlink-socket.cpp.
References NDN_LOG_TRACE, and ndn::net::NetlinkSocket::open().
void ndn::net::GenlSocket::sendRequest | ( | const std::string & | familyName, |
uint8_t | command, | ||
const void * | payload, | ||
size_t | payloadLen, | ||
MessageCallback | messageCb, | ||
std::function< void()> | errorCb | ||
) |
Definition at line 433 of file netlink-socket.cpp.
References nonstd::optional_lite::std11::move().
void ndn::net::GenlSocket::sendRequest | ( | uint16_t | familyId, |
uint8_t | command, | ||
const void * | payload, | ||
size_t | payloadLen, | ||
MessageCallback | messageCb | ||
) |
Definition at line 470 of file netlink-socket.cpp.
References bufs, ndn::net::NetlinkSocket::m_pid, ndn::net::NetlinkSocket::m_seqNum, ndn::net::NetlinkSocket::m_sock, nonstd::optional_lite::std11::move(), NDN_LOG_ERROR, NDN_LOG_TRACE, NDN_THROW, nlmsgTypeToString(), websocketpp::transport::error::operation_aborted, and ndn::net::NetlinkSocket::registerRequestCallback().
|
finalprotectedvirtual |
Reimplemented from ndn::net::NetlinkSocket.
Definition at line 599 of file netlink-socket.cpp.
References ndn::net::NetlinkSocket::nlmsgTypeToString(), and ndn::to_string().
Referenced by sendRequest().