snmp_session wrapper add pack/unpack feature More...

#include <Session.h>

Inheritance diagram for Snmp::Session:
Collaboration diagram for Snmp::Session:

Public Member Functions

 Session ()
 
 Session (const Session &session)
 
Sessionoperator= (const Session &session)
 
 ~Session ()
 
void pack (Ipc::TypedMsgHdr &msg) const
 prepare for sendmsg() More...
 
void unpack (const Ipc::TypedMsgHdr &msg)
 restore struct from the message More...
 

Public Attributes

int Version
 
u_char * community
 
int community_len
 
int retries
 
int timeout
 
char * peername
 
unsigned short remote_port
 
unsigned short local_port
 

Private Member Functions

void reset ()
 free internal members More...
 

Detailed Description

Definition at line 22 of file Session.h.

Constructor & Destructor Documentation

◆ Session() [1/2]

Snmp::Session::Session ( )

Definition at line 17 of file Session.cc.

◆ Session() [2/2]

Snmp::Session::Session ( const Session session)

Definition at line 22 of file Session.cc.

References operator=().

◆ ~Session()

Snmp::Session::~Session ( )
inline

Definition at line 28 of file Session.h.

References reset().

Member Function Documentation

◆ operator=()

Snmp::Session & Snmp::Session::operator= ( const Session session)

Definition at line 28 of file Session.cc.

References snmp_session::community, snmp_session::peername, and xstrdup.

Referenced by Session().

◆ pack()

void Snmp::Session::pack ( Ipc::TypedMsgHdr msg) const

◆ reset()

void Snmp::Session::reset ( void  )
private

Definition at line 46 of file Session.cc.

References Must, and xfree.

Referenced by ~Session().

◆ unpack()

void Snmp::Session::unpack ( const Ipc::TypedMsgHdr msg)

Member Data Documentation

◆ community

u_char* snmp_session::community
inherited

Definition at line 39 of file snmp_session.h.

Referenced by operator=(), snmp_build(), and snmp_parse().

◆ community_len

int snmp_session::community_len
inherited

Definition at line 40 of file snmp_session.h.

Referenced by snmp_build(), and snmp_parse().

◆ local_port

unsigned short snmp_session::local_port
inherited

Definition at line 45 of file snmp_session.h.

◆ peername

char* snmp_session::peername
inherited

Definition at line 43 of file snmp_session.h.

Referenced by operator=().

◆ remote_port

unsigned short snmp_session::remote_port
inherited

Definition at line 44 of file snmp_session.h.

◆ retries

int snmp_session::retries
inherited

Definition at line 41 of file snmp_session.h.

◆ timeout

int snmp_session::timeout
inherited

Definition at line 42 of file snmp_session.h.

◆ Version

int snmp_session::Version
inherited

Definition at line 37 of file snmp_session.h.

Referenced by snmp_build(), snmp_parse(), and snmpDecodePacket().


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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors