OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
aux::NetlinkSocket Class Reference

A storage for the Netlink socket descriptor. More...

Public Member Functions

 NetlinkSocket ()
 Creates a socket and binds it with AF_NETLINK family. More...
 
 ~NetlinkSocket ()
 Closes the Netlink connection. More...
 
const int & fd () const
 Returns a reference to the Netlink socket descriptor. More...
 
sockaddr_nl & netlink_socket ()
 Returns a reference to the Netlink socket sockaddr struct. More...
 

Private Member Functions

 NetlinkSocket (const NetlinkSocket &nl)
 Forbid the copy ctor. More...
 
const NetlinkSocketoperator= (const NetlinkSocket &nl)
 Forbid the copy assignment. More...
 

Private Attributes

int socket_fd
 A Netlink socket ID (descriptor) More...
 
sockaddr_nl local_sock_addr
 A Netlink socket sockaddr structure. More...
 

Detailed Description

A storage for the Netlink socket descriptor.

and for the Netlink socket sockaddr structure

Definition at line 132 of file linux/metadata_ipv6_netlink.cc.

Constructor & Destructor Documentation

aux::NetlinkSocket::NetlinkSocket ( const NetlinkSocket nl)
private

Forbid the copy ctor.

aux::NetlinkSocket::NetlinkSocket ( )
inline

Creates a socket and binds it with AF_NETLINK family.

and the kernel process

Definition at line 154 of file linux/metadata_ipv6_netlink.cc.

aux::NetlinkSocket::~NetlinkSocket ( )
inline

Closes the Netlink connection.

Definition at line 180 of file linux/metadata_ipv6_netlink.cc.

Member Function Documentation

const int& aux::NetlinkSocket::fd ( ) const
inline

Returns a reference to the Netlink socket descriptor.

Definition at line 190 of file linux/metadata_ipv6_netlink.cc.

sockaddr_nl& aux::NetlinkSocket::netlink_socket ( )
inline

Returns a reference to the Netlink socket sockaddr struct.

Definition at line 195 of file linux/metadata_ipv6_netlink.cc.

const NetlinkSocket& aux::NetlinkSocket::operator= ( const NetlinkSocket nl)
private

Forbid the copy assignment.

Member Data Documentation

sockaddr_nl aux::NetlinkSocket::local_sock_addr
private

A Netlink socket sockaddr structure.

Definition at line 148 of file linux/metadata_ipv6_netlink.cc.

int aux::NetlinkSocket::socket_fd
private

A Netlink socket ID (descriptor)

Definition at line 145 of file linux/metadata_ipv6_netlink.cc.


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