# PSNMP Class Reference

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

`#include <psnmp.h>`

Inheritance diagram for PSNMP:

List of all members.

## Public Types

typedef list< pair< PString, PRFC1155_ObjectSyntax > > | BindingList
| NoError = 0
| TooBig = 1
| NoSuchName = 2
| BadValue = 3
| ReadOnly = 4
| GenErr = 5
| NoResponse
| MalformedResponse
| SendFailed
| RxBufferTooSmall
| TxDataTooBig
| NumErrors
| GetRequest = 0
| GetNextRequest = 1
| GetResponse = 2
| SetRequest = 3
| Trap = 4
| TrapPort = 162
| ColdStart = 0
| WarmStart = 1
| LinkDown = 2
| LinkUp = 3
| AuthenticationFailure = 4
| EGPNeighbourLoss = 5
| EnterpriseSpecific = 6
| NumTrapTypes
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 }

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

## 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,
|  | const PSNMPVarBindingList & | vars,
|  | WORD | sendPort = `TrapPort` |
| ) |  |  | `[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::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::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::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