Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vasum::netlink::Netlink Class Reference

Netlink class is responsible for communicating with kernel through netlink interface. More...

#include <netlink.hpp>

Public Member Functions

 Netlink ()
 
 ~Netlink ()
 
 Netlink (const Netlink &other)=delete
 
Netlinkoperator= (const Netlink &other)=delete
 
void open (int netNsPid=0)
 Open connnection. More...
 
void close ()
 Close connection. More...
 
unsigned int send (const void *nlmsg)
 Send message. More...
 
std::unique_ptr< std::vector
< char > > 
rcv (unsigned int nlmsgSeq)
 Receive message. More...
 

Private Attributes

int mFd
 

Detailed Description

Netlink class is responsible for communicating with kernel through netlink interface.

Constructor & Destructor Documentation

vasum::netlink::Netlink::Netlink ( )
vasum::netlink::Netlink::~Netlink ( )
vasum::netlink::Netlink::Netlink ( const Netlink other)
delete

Member Function Documentation

void vasum::netlink::Netlink::close ( )

Close connection.

void vasum::netlink::Netlink::open ( int  netNsPid = 0)

Open connnection.

Parameters
netNsPidpid which defines net namespace
Netlink& vasum::netlink::Netlink::operator= ( const Netlink other)
delete
std::unique_ptr< std::vector< char > > vasum::netlink::Netlink::rcv ( unsigned int  nlmsgSeq)

Receive message.

It is not thread safe and even you shouldn't call this function on different instances at the same time

Parameters
nlmsgSeqsequence number
Returns
received data
unsigned int vasum::netlink::Netlink::send ( const void *  nlmsg)

Send message.

It is not thread safe and even you shouldn't call this function on different instances at the same time

Parameters
nlmsgpointer to message
Returns
sequence number

Member Data Documentation

int vasum::netlink::Netlink::mFd
private

The documentation for this class was generated from the following files: