ACE_Netlink_Addr Class Reference

Defines a C++ wrapper facade for the netlink sockets. More...

#include <Netlink_Addr.h>

Inheritance diagram for ACE_Netlink_Addr:

Inheritance graph
Collaboration diagram for ACE_Netlink_Addr:

Collaboration graph
List of all members.

Public Member Functions

 ACE_Netlink_Addr (void)
 Default constructor.

 ACE_Netlink_Addr (const ACE_Netlink_Addr &)
 Copy constructor.

 ACE_Netlink_Addr (const sockaddr_nl *, int len)
 Creates an ACE_INET_Addr from a sockaddr_in structure.

 ~ACE_Netlink_Addr (void)

int set (const ACE_Netlink_Addr &naddr)
void set (int pid, int gid)
int set (const sockaddr_nl *, int len)
int get_pid (void) const
int get_gid (void) const
virtual void * get_addr (void) const
int get_addr_size (void) const
virtual void set_addr (void *, int len=sizeof(sockaddr_nl))

Public Attributes

 Declare the dynamic allocation hooks.

Private Member Functions

int determine_type (void) const
void reset (void)

Private Attributes

sockaddr_nl nl_

Detailed Description

Defines a C++ wrapper facade for the netlink sockets.

Definition at line 41 of file Netlink_Addr.h.

Constructor & Destructor Documentation

ACE_Netlink_Addr::ACE_Netlink_Addr void   ) 

Default constructor.

ACE_Netlink_Addr::ACE_Netlink_Addr const ACE_Netlink_Addr  ) 

Copy constructor.

Definition at line 36 of file Netlink_Addr.cpp.

References set().

00037 : ACE_Addr (AF_NETLINK, sa.get_size ())
00038 {
00039   this->set (sa);
00040 }

ACE_Netlink_Addr::ACE_Netlink_Addr const sockaddr_nl *  ,
int  len

Creates an ACE_INET_Addr from a sockaddr_in structure.

Definition at line 48 of file Netlink_Addr.cpp.

References set().

00049 {
00050   this->set (un, len);
00051 }

ACE_Netlink_Addr::~ACE_Netlink_Addr void   ) 


Member Function Documentation

int ACE_Netlink_Addr::determine_type void   )  const [private]

family type AF_NETLINK

virtual void* ACE_Netlink_Addr::get_addr void   )  const [virtual]

addr pointer
See also:

Reimplemented from ACE_Addr.

int ACE_Netlink_Addr::get_addr_size void   )  const

nl_ member
See also:
nl_ size

int ACE_Netlink_Addr::get_gid void   )  const

the group id
See also:

Definition at line 60 of file Netlink_Addr.cpp.

References nl_.

00061 {
00062   return this->nl_.nl_groups;
00063 }

int ACE_Netlink_Addr::get_pid void   )  const


Definition at line 54 of file Netlink_Addr.cpp.

References nl_.

00055 {
00056   return this->nl_.nl_pid;
00057 }

void ACE_Netlink_Addr::reset void   )  [private]

set nl_

See also:
nl_ to zero and sets address family to default value

int ACE_Netlink_Addr::set const sockaddr_nl *  ,
int  len

set nl_ to nl_

See also:

Definition at line 42 of file Netlink_Addr.cpp.

References ACE_OS::memcpy().

00043 {
00044   (void) ACE_OS::memcpy ((void *) &this->nl_,un,len);
00045   return 0;
00046 }

void ACE_Netlink_Addr::set int  pid,
int  gid

sets the pid and groups fields of member nl_

See also:

ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_Netlink_Addr::set const ACE_Netlink_Addr naddr  ) 

naddr sets the nl_ member
See also:

Definition at line 26 of file Netlink_Addr.cpp.

References ACE_Addr::base_set(), ACE_Addr::get_size(), ACE_Addr::get_type(), ACE_OS::memset(), and nl_.

Referenced by ACE_Netlink_Addr().

00027 {
00028   ACE_OS::memset ((void *) &this->nl_,0,sizeof this->nl_);
00029   this->nl_.nl_family = AF_NETLINK;
00030   this->base_set (sa.get_type (), sa.get_size ());
00031   return 0;
00032 }

virtual void ACE_Netlink_Addr::set_addr void *  ,
int  len = sizeof(sockaddr_nl)

Set a pointer to the address

Reimplemented from ACE_Addr.

Member Data Documentation


Declare the dynamic allocation hooks.

Reimplemented from ACE_Addr.

Definition at line 91 of file Netlink_Addr.h.

sockaddr_nl ACE_Netlink_Addr::nl_ [private]

Definition at line 104 of file Netlink_Addr.h.

Referenced by get_gid(), get_pid(), and set().

The documentation for this class was generated from the following files:
Generated on Thu Nov 9 11:25:38 2006 for ACE by doxygen 1.3.6