OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
aux::NetlinkRequest< T > Struct Template Reference

A class template to store Netlink request data. More...

Public Member Functions

msghdr * message (sockaddr_nl &s_nl)
 Returns a pointer to the Netlink message, generated using this class. More...
 
void insert_attr (unsigned short attr_type, int attr_len, const void *attr_data)
 Inserts an attribute stored in attr_data into this Netlink reequest. More...
 
 NetlinkRequest ()
 Creates new blank request. More...
 
 ~NetlinkRequest ()
 NetlinkRequest dtor. More...
 

Public Attributes

nlmsghdr nl_message_hdr
 A structure carrying the main netlink header. More...
 
nl_req_hdr
 A structure carrying the request-specific header. More...
 
char payload [16384]
 A block of memory of memory carrying attributes of this request. More...
 
unsigned int & msg_len
 A reference to the total length of this Netlink request. More...
 

Private Member Functions

 NetlinkRequest (const NetlinkRequest< T > &)
 Disallow copy ctor. More...
 
const NetlinkRequestoperator= (const NetlinkRequest< T > &)
 Disallow assignment operator. More...
 

Private Attributes

iovec iov_
 An iovec struct to keep headers with data. More...
 
std::unique_ptr< msghdr > msg_ptr_
 A pointer to the Netlink message header. More...
 

Detailed Description

template<class T>
struct aux::NetlinkRequest< T >

A class template to store Netlink request data.

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

Constructor & Destructor Documentation

template<class T>
aux::NetlinkRequest< T >::NetlinkRequest ( )
inline

Creates new blank request.

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

template<class T>
aux::NetlinkRequest< T >::~NetlinkRequest ( )
inline

NetlinkRequest dtor.

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

template<class T>
aux::NetlinkRequest< T >::NetlinkRequest ( const NetlinkRequest< T > &  )
private

Disallow copy ctor.

Member Function Documentation

template<class T>
void aux::NetlinkRequest< T >::insert_attr ( unsigned short  attr_type,
int  attr_len,
const void *  attr_data 
)
inline

Inserts an attribute stored in attr_data into this Netlink reequest.

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

Here is the call graph for this function:

template<class T>
msghdr* aux::NetlinkRequest< T >::message ( sockaddr_nl &  s_nl)
inline

Returns a pointer to the Netlink message, generated using this class.

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

template<class T>
const NetlinkRequest& aux::NetlinkRequest< T >::operator= ( const NetlinkRequest< T > &  )
private

Disallow assignment operator.

Member Data Documentation

template<class T>
iovec aux::NetlinkRequest< T >::iov_
private

An iovec struct to keep headers with data.

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

template<class T>
unsigned int& aux::NetlinkRequest< T >::msg_len

A reference to the total length of this Netlink request.

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

template<class T>
std::unique_ptr<msghdr> aux::NetlinkRequest< T >::msg_ptr_
private

A pointer to the Netlink message header.

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

template<class T>
nlmsghdr aux::NetlinkRequest< T >::nl_message_hdr

A structure carrying the main netlink header.

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

template<class T>
T aux::NetlinkRequest< T >::nl_req_hdr

A structure carrying the request-specific header.

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

template<class T>
char aux::NetlinkRequest< T >::payload[16384]

A block of memory of memory carrying attributes of this request.

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


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