#include <Pdu.h>

Inheritance diagram for Snmp::Pdu:
Collaboration diagram for Snmp::Pdu:

Public Member Functions

 Pdu ()
 
 Pdu (const Pdu &pdu)
 
Pduoperator= (const Pdu &pdu)
 
 ~Pdu ()
 
void aggregate (const Pdu &pdu)
 
void fixAggregate ()
 
void pack (Ipc::TypedMsgHdr &msg) const
 prepare for sendmsg() More...
 
void unpack (const Ipc::TypedMsgHdr &msg)
 restore struct from the message More...
 
int varCount () const
 size of variables list More...
 
void clear ()
 clear all internal members More...
 
void setVars (variable_list *vars)
 perform assignment of variables list More...
 
void clearVars ()
 clear variables list More...
 
Range< const oid * > getSystemOid () const
 
void setSystemOid (const Range< const oid * > &systemOid)
 
void clearSystemOid ()
 

Public Attributes

int command
 
struct sockaddr_in address
 
int reqid
 
int errstat
 
int errindex
 
int non_repeaters
 
int max_repetitions
 
struct variable_listvariables
 
oidenterprise
 
int enterprise_length
 
struct sockaddr_in agent_addr
 
int trap_type
 
int specific_type
 
u_int time
 

Private Member Functions

void init ()
 initialize members More...
 
void assign (const Pdu &pdu)
 perform full assignment More...
 

Private Attributes

unsigned int aggrCount
 The number of other Pdus merged into. More...
 

Detailed Description

snmp_pdu wrapper introduce the feature to aggregate variables and to pack/unpack message

Definition at line 23 of file Pdu.h.

Constructor & Destructor Documentation

Snmp::Pdu::Pdu ( )

Definition at line 21 of file Pdu.cc.

References init().

Snmp::Pdu::Pdu ( const Pdu pdu)

Definition at line 26 of file Pdu.cc.

Snmp::Pdu::~Pdu ( )

Definition at line 32 of file Pdu.cc.

Member Function Documentation

void Snmp::Pdu::clear ( )

Definition at line 90 of file Pdu.cc.

void Snmp::Pdu::clearSystemOid ( )

Definition at line 139 of file Pdu.cc.

References NULL, and xfree.

void Snmp::Pdu::clearVars ( )

Definition at line 117 of file Pdu.cc.

References variable_list::next_variable, NULL, and snmp_var_free().

void Snmp::Pdu::fixAggregate ( )

Definition at line 228 of file Pdu.cc.

References atAverage, variable_list::name, variable_list::name_length, NULL, and snmpAggrType().

Range< const oid * > Snmp::Pdu::getSystemOid ( ) const

Definition at line 149 of file Pdu.cc.

Referenced by assign().

void Snmp::Pdu::init ( void  )
private

Definition at line 46 of file Pdu.cc.

References SNMP_DEFAULT_ERRINDEX, and SNMP_DEFAULT_ERRSTAT.

Referenced by Pdu().

Snmp::Pdu & Snmp::Pdu::operator= ( const Pdu pdu)

Definition at line 38 of file Pdu.cc.

void Snmp::Pdu::pack ( Ipc::TypedMsgHdr msg) const
void Snmp::Pdu::setSystemOid ( const Range< const oid * > &  systemOid)

Definition at line 155 of file Pdu.cc.

References Range< C, S >::end, NULL, Range< C, S >::size(), Range< C, S >::start, and xmalloc.

void Snmp::Pdu::setVars ( variable_list vars)

Definition at line 129 of file Pdu.cc.

References variable_list::next_variable, and NULL.

int Snmp::Pdu::varCount ( ) const

Definition at line 219 of file Pdu.cc.

References NULL.

Referenced by aggregate().

Member Data Documentation

struct sockaddr_in snmp_pdu::address
inherited

Definition at line 52 of file snmp_pdu.h.

Referenced by assign(), and snmp_pdu_create().

struct sockaddr_in snmp_pdu::agent_addr
inherited

Definition at line 67 of file snmp_pdu.h.

Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().

unsigned int Snmp::Pdu::aggrCount
private

Definition at line 46 of file Pdu.h.

Referenced by assign().

oid* snmp_pdu::enterprise
inherited

Definition at line 65 of file snmp_pdu.h.

Referenced by snmp_free_pdu(), snmp_pdu_create(), snmp_pdu_decode(), and snmp_pdu_encode().

int snmp_pdu::enterprise_length
inherited

Definition at line 66 of file snmp_pdu.h.

Referenced by snmp_pdu_create(), snmp_pdu_decode(), and snmp_pdu_encode().

int snmp_pdu::errindex
inherited
int snmp_pdu::max_repetitions
inherited

Definition at line 60 of file snmp_pdu.h.

Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().

int snmp_pdu::non_repeaters
inherited

Definition at line 59 of file snmp_pdu.h.

Referenced by assign(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().

int snmp_pdu::reqid
inherited
int snmp_pdu::specific_type
inherited

Definition at line 69 of file snmp_pdu.h.

Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().

u_int snmp_pdu::time
inherited

Definition at line 70 of file snmp_pdu.h.

Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().

int snmp_pdu::trap_type
inherited

Definition at line 68 of file snmp_pdu.h.

Referenced by assign(), snmp_pdu_decode(), and snmp_pdu_encode().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors