#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 = 0
 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

◆ Pdu() [1/2]

Snmp::Pdu::Pdu ( )

Definition at line 21 of file Pdu.cc.

References init().

◆ Pdu() [2/2]

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

Definition at line 26 of file Pdu.cc.

References assign(), and init().

◆ ~Pdu()

Snmp::Pdu::~Pdu ( )

Definition at line 32 of file Pdu.cc.

References clear().

Member Function Documentation

◆ aggregate()

◆ assign()

◆ clear()

void Snmp::Pdu::clear ( )

Definition at line 91 of file Pdu.cc.

References clearSystemOid(), clearVars(), and init().

Referenced by operator=(), unpack(), and ~Pdu().

◆ clearSystemOid()

void Snmp::Pdu::clearSystemOid ( )

Definition at line 140 of file Pdu.cc.

References snmp_pdu::enterprise, snmp_pdu::enterprise_length, NULL, and xfree.

Referenced by clear(), and setSystemOid().

◆ clearVars()

void Snmp::Pdu::clearVars ( )

Definition at line 118 of file Pdu.cc.

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

Referenced by clear(), and setVars().

◆ fixAggregate()

void Snmp::Pdu::fixAggregate ( )

◆ getSystemOid()

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

Definition at line 150 of file Pdu.cc.

References snmp_pdu::enterprise, and snmp_pdu::enterprise_length.

Referenced by assign().

◆ init()

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

Definition at line 46 of file Pdu.cc.

References aggrCount, snmp_pdu::errindex, snmp_pdu::errstat, SNMP_DEFAULT_ERRINDEX, and SNMP_DEFAULT_ERRSTAT.

Referenced by clear(), and Pdu().

◆ operator=()

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

Definition at line 38 of file Pdu.cc.

References assign(), and clear().

◆ pack()

◆ setSystemOid()

void Snmp::Pdu::setSystemOid ( const Range< const oid *> &  systemOid)

◆ setVars()

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

Definition at line 130 of file Pdu.cc.

References clearVars(), variable_list::next_variable, NULL, and snmp_pdu::variables.

Referenced by assign().

◆ unpack()

◆ varCount()

int Snmp::Pdu::varCount ( ) const

Definition at line 220 of file Pdu.cc.

References NULL, and snmp_pdu::variables.

Referenced by aggregate(), and pack().

Member Data Documentation

◆ address

struct sockaddr_in snmp_pdu::address
inherited

Definition at line 52 of file snmp_pdu.h.

Referenced by assign(), pack(), and unpack().

◆ agent_addr

struct sockaddr_in snmp_pdu::agent_addr
inherited

Definition at line 67 of file snmp_pdu.h.

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

◆ aggrCount

unsigned int Snmp::Pdu::aggrCount = 0
private

Definition at line 46 of file Pdu.h.

Referenced by aggregate(), assign(), fixAggregate(), and init().

◆ command

◆ enterprise

oid* snmp_pdu::enterprise
inherited

◆ enterprise_length

int snmp_pdu::enterprise_length
inherited

◆ errindex

int snmp_pdu::errindex
inherited

◆ errstat

◆ max_repetitions

int snmp_pdu::max_repetitions
inherited

Definition at line 60 of file snmp_pdu.h.

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

◆ non_repeaters

int snmp_pdu::non_repeaters
inherited

Definition at line 59 of file snmp_pdu.h.

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

◆ reqid

int snmp_pdu::reqid
inherited

◆ specific_type

int snmp_pdu::specific_type
inherited

Definition at line 69 of file snmp_pdu.h.

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

◆ time

u_int snmp_pdu::time
inherited

Definition at line 70 of file snmp_pdu.h.

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

◆ trap_type

int snmp_pdu::trap_type
inherited

Definition at line 68 of file snmp_pdu.h.

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

◆ variables


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors