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 Types | Static Public Member Functions | List of all members
PSNMP Class Reference

A descendant of PUDPSocket which can perform SNMP calls. More...

`#include <psnmp.h>`

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

## Public Types
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
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)

## Additional Inherited Members
Public Member Functions inherited from PIndirectChannel
| PIndirectChannel ()
| Create a new indirect channel without any channels to redirect to. More...
| ~PIndirectChannel ()
| Close the indirect channel, deleting read/write channels if desired. More...
Comparison | Compare (const PObject &obj) const
| Determine if the two objects refer to the same indirect channel. More...
virtual PString | GetName () const
| Get the name of the channel. More...
virtual PBoolean | Close ()
| Close the channel. More...
virtual PBoolean | IsOpen () const
| Determine if the channel is currently open and read and write operations can be executed on it. More...
virtual PBoolean | Read (void *buf, PINDEX len)
| Low level read from the channel. More...
virtual PBoolean | Write (const void *buf, PINDEX len)
| Low level write to the channel. More...
virtual PBoolean | Shutdown (ShutdownValue option)
| Close one or both of the data streams associated with a channel. More...
virtual bool | SetLocalEcho (bool localEcho)
| Set local echo mode. More...
virtual PChannel * | GetBaseReadChannel () const
| This function returns the eventual base channel for reading of a series of indirect channels provided by descendents of `PIndirectChannel`. More...
virtual PChannel * | GetBaseWriteChannel () const
| This function returns the eventual base channel for writing of a series of indirect channels provided by descendents of `PIndirectChannel`. More...
virtual PString | GetErrorText (ErrorGroup group=NumErrorGroups) const
| Get error message description. More...
PBoolean | Open (PChannel &channel)
| Set the channel for both read and write operations. More...
PBoolean | Open (PChannel *channel, PBoolean autoDelete=true)
| Set the channel for both read and write operations. More...
PBoolean | Open (PChannel *readChannel, PChannel *writeChannel, PBoolean autoDeleteRead=true, PBoolean autoDeleteWrite=true)
| Set the channel for both read and write operations. More...
PChannel * | GetReadChannel () const
| Get the channel used for read operations. More...
bool | SetReadChannel (PChannel *channel, bool autoDelete=true, bool closeExisting=false)
| Set the channel for read operations. More...
PChannel * | GetWriteChannel () const
| Get the channel used for write operations. More...
PBoolean | SetWriteChannel (PChannel *channel, bool autoDelete=true, bool closeExisting=false)
| Set the channel for read operations. More...
Protected Member Functions inherited from PIndirectChannel
virtual PBoolean | OnOpen ()
| This callback is executed when the Open() function is called with open channels. More...
Protected Attributes inherited from PIndirectChannel
PChannel * | readChannel
| Channel for read operations. More...
PBoolean | readAutoDelete
| Automatically delete read channel on destruction. More...
PChannel * | writeChannel
| Channel for write operations. More...
PBoolean | writeAutoDelete
| Automatically delete write channel on destruction. More...
PReadWriteMutex | channelPointerMutex
| Race condition prevention on closing channel. More...
Friends inherited from PObject

## Detailed Description

A descendant of PUDPSocket which can perform SNMP calls.

## Member Typedef Documentation

typedef list<pair<PString,PRFC1155_ObjectSyntax> > PSNMP::BindingList

## Member Enumeration Documentation

anonymous enum

Enumerator
TrapPort |

enum PSNMP::ErrorType

Enumerator
NoError |
TooBig |
NoSuchName |
BadValue |
ReadOnly |
GenErr |
NoResponse |
MalformedResponse |
SendFailed |
RxBufferTooSmall |
TxDataTooBig |
NumErrors |

enum PSNMP::RequestType

Enumerator
GetRequest |
GetNextRequest |
GetResponse |
SetRequest |
Trap |

enum PSNMP::TrapType

Enumerator
ColdStart |
WarmStart |
LinkDown |
LinkUp |
AuthenticationFailure |
EGPNeighbourLoss |
EnterpriseSpecific |
NumTrapTypes |

## Member Function Documentation

static PString PSNMP::GetErrorText | ( | ErrorType | err | ) |
| static

static PString PSNMP::GetTrapTypeText | ( | PINDEX | code | ) |
| static

static void PSNMP::SendEnterpriseTrap | ( | const PIPSocket::Address & | addr,
|  | const PString & | community,
|  | const PString & | enterprise,
|  | PINDEX | specificTrap,
|  | PASNUnsigned | timeTicks,
|  | WORD | sendPort = `TrapPort`
| ) |  |
| static

static void PSNMP::SendEnterpriseTrap | ( | const PIPSocket::Address & | addr,
|  | const PString & | community,
|  | const PString & | enterprise,
|  | PINDEX | specificTrap,
|  | PASNUnsigned | timeTicks,
|  | const PSNMPVarBindingList & | vars,
|  | WORD | sendPort = `TrapPort`
| ) |  |
| static

static void PSNMP::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

static void PSNMP::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

static void PSNMP::WriteTrap | ( | PChannel & | channel,
|  | PSNMP::TrapType | trapType,
|  | const PString & | community,
|  | const PString & | enterprise,
|  | PINDEX | specificTrap,
|  | PASNUnsigned | timeTicks,
|  | const PSNMPVarBindingList & | vars,
|  | const PIPSocket::Address & | agentAddress
| ) |  |
| static

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

- psnmp.h