#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.

◆ ~Pdu()

Snmp::Pdu::~Pdu ( )

Definition at line 32 of file Pdu.cc.

Member Function Documentation

◆ aggregate()

◆ assign()

◆ clear()

void Snmp::Pdu::clear ( )

Definition at line 91 of file Pdu.cc.

◆ clearSystemOid()

void Snmp::Pdu::clearSystemOid ( )

Definition at line 140 of file Pdu.cc.

References xfree.

◆ clearVars()

void Snmp::Pdu::clearVars ( )

Definition at line 118 of file Pdu.cc.

References variable_list::next_variable, and snmp_var_free().

◆ fixAggregate()

void Snmp::Pdu::fixAggregate ( )

◆ getSystemOid()

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

Definition at line 150 of file Pdu.cc.

Referenced by assign().

◆ init()

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().

◆ operator=()

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

Definition at line 38 of file Pdu.cc.

◆ pack()

◆ setSystemOid()

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

Definition at line 156 of file Pdu.cc.

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

◆ setVars()

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

Definition at line 130 of file Pdu.cc.

References variable_list::next_variable.

◆ unpack()

◆ varCount()

int Snmp::Pdu::varCount ( ) const

Definition at line 220 of file Pdu.cc.

References variable_list::next_variable.

Referenced by aggregate().

Member Data Documentation

◆ address

struct sockaddr_in snmp_pdu::address
inherited

Definition at line 52 of file snmp_pdu.h.

Referenced by assign(), and snmp_pdu_create().

◆ agent_addr

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().

◆ aggrCount

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

Definition at line 46 of file Pdu.h.

Referenced by assign().

◆ command

◆ enterprise

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().

◆ enterprise_length

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().

◆ 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(), snmp_coexist_V2toV1(), snmp_pdu_decode(), and snmp_pdu_encode().

◆ non_repeaters

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().

◆ 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(), snmp_pdu_decode(), and snmp_pdu_encode().

◆ time

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().

◆ trap_type

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().

◆ variables


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors