PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PSNMPClient Class Reference

Class which gets SNMP data. More...

`#include <psnmp.h>`

Inheritance diagram for PSNMPClient:
[legend]
Collaboration diagram for PSNMPClient:
[legend]

## 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
Public Types inherited from PSNMP
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 Public Member Functions inherited from PSNMP
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)
Friends inherited from PObject

## Detailed Description

Class which gets SNMP data.

## Constructor & Destructor Documentation

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`
| ) |  |

## Member Function Documentation

PString PSNMPClient::GetCommunity | ( |  | ) | const

ErrorType PSNMPClient::GetLastErrorCode | ( |  | ) | const

PINDEX PSNMPClient::GetLastErrorIndex | ( |  | ) | const

PString PSNMPClient::GetLastErrorText | ( |  | ) | const

PASNInt PSNMPClient::GetRequestID | ( |  | ) | const

PASNInt PSNMPClient::GetVersion | ( |  | ) | const

PBoolean PSNMPClient::ReadRequest | ( | PBYTEArray & | readBuffer | ) |
| 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
| ) |  |

PBoolean PSNMPClient::WriteRequest | ( | PASNInt | requestCode,
|  | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut
| ) |  |
| protected

PBoolean PSNMPClient::WriteSetRequest | ( | PSNMPVarBindingList & | varsIn,
|  | PSNMPVarBindingList & | varsOut
| ) |  |

## Member Data Documentation

PString PSNMPClient::community
| protected

PString PSNMPClient::hostName
| protected

ErrorType PSNMPClient::lastErrorCode
| protected

PINDEX PSNMPClient::lastErrorIndex
| protected

PINDEX PSNMPClient::maxRxSize
| protected

PINDEX PSNMPClient::maxTxSize
| protected

PBYTEArray PSNMPClient::readBuffer
| protected

PASNInt PSNMPClient::requestId
| protected

PINDEX PSNMPClient::retryMax
| protected

PASNInt PSNMPClient::version
| protected

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

- psnmp.h