snmp_session wrapper add pack/unpack feature More...
#include <Session.h>
Public Member Functions | |
Session () | |
Session (const Session &session) | |
Session & | operator= (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
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()
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 |
Definition at line 57 of file Session.cc.
References Must, Ipc::TypedMsgHdr::putFixed(), Ipc::TypedMsgHdr::putInt(), Ipc::TypedMsgHdr::putPod(), and retries.
◆ reset()
|
private |
◆ unpack()
void Snmp::Session::unpack | ( | const Ipc::TypedMsgHdr & | msg | ) |
Definition at line 76 of file Session.cc.
References Ipc::TypedMsgHdr::getFixed(), Ipc::TypedMsgHdr::getInt(), Ipc::TypedMsgHdr::getPod(), Must, retries, and xmalloc.
Member Data Documentation
◆ community
|
inherited |
Definition at line 39 of file snmp_session.h.
Referenced by operator=(), snmp_build(), and snmp_parse().
◆ community_len
|
inherited |
Definition at line 40 of file snmp_session.h.
Referenced by snmp_build(), and snmp_parse().
◆ local_port
|
inherited |
Definition at line 45 of file snmp_session.h.
◆ peername
|
inherited |
Definition at line 43 of file snmp_session.h.
Referenced by operator=().
◆ remote_port
|
inherited |
Definition at line 44 of file snmp_session.h.
◆ retries
|
inherited |
Definition at line 41 of file snmp_session.h.
◆ timeout
|
inherited |
Definition at line 42 of file snmp_session.h.
◆ 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:
- src/snmp/Session.h
- src/snmp/Session.cc