PTLib
Version 2.14.3
|
Class which gets SNMP data. More...
#include <psnmp.h>
Public Member Functions | |
PSNMPClient (const PString &host, PINDEX retryMax=5, PINDEX timeoutMax=5, PINDEX rxBufferSize=1500, PINDEX txSize=484) | |
PSNMPClient (PINDEX retryMax=5, PINDEX timeoutMax=5, PINDEX rxBufferSize=1500, PINDEX txSize=484) | |
void | SetVersion (PASNInt version) |
PASNInt | GetVersion () const |
void | SetCommunity (const PString &str) |
PString | GetCommunity () const |
void | SetRequestID (PASNInt requestID) |
PASNInt | GetRequestID () const |
PBoolean | WriteGetRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut) |
PBoolean | WriteGetNextRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut) |
PBoolean | WriteSetRequest (PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut) |
ErrorType | GetLastErrorCode () const |
PINDEX | GetLastErrorIndex () const |
PString | GetLastErrorText () const |
Protected Member Functions | |
PBoolean | WriteRequest (PASNInt requestCode, PSNMPVarBindingList &varsIn, PSNMPVarBindingList &varsOut) |
PBoolean | ReadRequest (PBYTEArray &readBuffer) |
Protected Attributes | |
PString | hostName |
PString | community |
PASNInt | requestId |
PASNInt | version |
PINDEX | retryMax |
PINDEX | lastErrorIndex |
ErrorType | lastErrorCode |
PBYTEArray | readBuffer |
PINDEX | maxRxSize |
PINDEX | maxTxSize |
Additional Inherited Members | |
![]() | |
enum | ErrorType { NoError = 0, TooBig = 1, NoSuchName = 2, BadValue = 3, ReadOnly = 4, GenErr = 5, NoResponse, MalformedResponse, SendFailed, RxBufferTooSmall, TxDataTooBig, NumErrors } |
enum | RequestType { GetRequest = 0, GetNextRequest = 1, GetResponse = 2, SetRequest = 3, Trap = 4 } |
enum | { TrapPort = 162 } |
enum | TrapType { ColdStart = 0, WarmStart = 1, LinkDown = 2, LinkUp = 3, AuthenticationFailure = 4, EGPNeighbourLoss = 5, EnterpriseSpecific = 6, NumTrapTypes } |
typedef list< pair< PString, PRFC1155_ObjectSyntax > > | BindingList |
![]() | |
static PString | GetErrorText (ErrorType err) |
static PString | GetTrapTypeText (PINDEX code) |
static void | SendEnterpriseTrap (const PIPSocket::Address &addr, const PString &community, const PString &enterprise, PINDEX specificTrap, PASNUnsigned timeTicks, WORD sendPort=TrapPort) |
static void | SendEnterpriseTrap (const PIPSocket::Address &addr, const PString &community, const PString &enterprise, PINDEX specificTrap, PASNUnsigned timeTicks, const PSNMPVarBindingList &vars, WORD sendPort=TrapPort) |
static void | SendTrap (const PIPSocket::Address &addr, PSNMP::TrapType trapType, const PString &community, const PString &enterprise, PINDEX specificTrap, PASNUnsigned timeTicks, const PSNMPVarBindingList &vars, WORD sendPort=TrapPort) |
static void | SendTrap (const PIPSocket::Address &addr, PSNMP::TrapType trapType, const PString &community, const PString &enterprise, PINDEX specificTrap, PASNUnsigned timeTicks, const PSNMPVarBindingList &vars, const PIPSocket::Address &agentAddress, WORD sendPort=TrapPort) |
static void | WriteTrap (PChannel &channel, PSNMP::TrapType trapType, const PString &community, const PString &enterprise, PINDEX specificTrap, PASNUnsigned timeTicks, const PSNMPVarBindingList &vars, const PIPSocket::Address &agentAddress) |
![]() |
Class which gets SNMP data.
PSNMPClient::PSNMPClient | ( | const PString & | host, |
PINDEX | retryMax = 5 , |
||
PINDEX | timeoutMax = 5 , |
||
PINDEX | rxBufferSize = 1500 , |
||
PINDEX | txSize = 484 |
||
) |
PSNMPClient::PSNMPClient | ( | PINDEX | retryMax = 5 , |
PINDEX | timeoutMax = 5 , |
||
PINDEX | rxBufferSize = 1500 , |
||
PINDEX | txSize = 484 |
||
) |
PString PSNMPClient::GetCommunity | ( | ) | const |
ErrorType PSNMPClient::GetLastErrorCode | ( | ) | const |
PINDEX PSNMPClient::GetLastErrorIndex | ( | ) | const |
PString PSNMPClient::GetLastErrorText | ( | ) | const |
PASNInt PSNMPClient::GetRequestID | ( | ) | const |
PASNInt PSNMPClient::GetVersion | ( | ) | const |
|
protected |
void PSNMPClient::SetCommunity | ( | const PString & | str | ) |
void PSNMPClient::SetRequestID | ( | PASNInt | requestID | ) |
void PSNMPClient::SetVersion | ( | PASNInt | version | ) |
PBoolean PSNMPClient::WriteGetNextRequest | ( | PSNMPVarBindingList & | varsIn, |
PSNMPVarBindingList & | varsOut | ||
) |
PBoolean PSNMPClient::WriteGetRequest | ( | PSNMPVarBindingList & | varsIn, |
PSNMPVarBindingList & | varsOut | ||
) |
|
protected |
PBoolean PSNMPClient::WriteSetRequest | ( | PSNMPVarBindingList & | varsIn, |
PSNMPVarBindingList & | varsOut | ||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |