# PSNMPServer Class Reference

Class which supplies SNMP data. More...

`#include <psnmp.h>`

Inheritance diagram for PSNMPServer:

List of all members.

## Public Member Functions

| PSNMPServer (PIPSocket::Address binding=PIPSocket::GetDefaultIpAny(), WORD localPort=161, PINDEX timeout=5000, PINDEX rxSize=10000, PINDEX txSize=10000)
| ~PSNMPServer ()
void | Main ()
void | SetVersion (PASNInt newVersion)
PBoolean | HandleChannel ()
PBoolean | ProcessPDU (const PBYTEArray &readBuffer, PBYTEArray &writeBuffer)
virtual PBoolean | Authorise (const PIPSocket::Address &received)
virtual PBoolean | ConfirmVersion (PASN_Integer vers)
virtual PBoolean | ConfirmCommunity (PASN_OctetString &community)
virtual PBoolean | MIB_LocalMatch (PSNMP_PDU &pdu)
virtual PBoolean | OnGetRequest (PINDEX reqID, PSNMP::BindingList &vars, PSNMP::ErrorType &errCode)
virtual PBoolean | OnGetNextRequest (PINDEX reqID, PSNMP::BindingList &vars, PSNMP::ErrorType &errCode)
virtual PBoolean | OnSetRequest (PINDEX reqID, PSNMP::BindingList &vars, PSNMP::ErrorType &errCode)
PSNMP::ErrorType | SendGetResponse (PSNMPVarBindingList &vars)

## Protected Attributes

PThreadObj< PSNMPServer > | m_thread
PString | community
PASN_Integer | version
PINDEX | lastErrorIndex
ErrorType | lastErrorCode
| The platform independant error code.
PBYTEArray | readBuffer
PINDEX | maxRxSize
PINDEX | maxTxSize
PUDPSocket * | baseSocket
PDictionary< PRFC1155_ObjectName, PRFC1155_ObjectSyntax > | objList

## Detailed Description

Class which supplies SNMP data.

## Constructor & Destructor Documentation

PSNMPServer::PSNMPServer | ( | PIPSocket::Address | binding = `PIPSocket::GetDefaultIpAny()`,
|  | WORD | localPort = `161`,
|  | PINDEX | timeout = `5000`,
|  | PINDEX | rxSize = `10000`,
|  | PINDEX | txSize = `10000` |
| ) |  |  |

PSNMPServer::~PSNMPServer | ( |  | ) |

## Member Function Documentation

virtual PBoolean PSNMPServer::Authorise | ( | const PIPSocket::Address & | received | ) | `[virtual]`

virtual PBoolean PSNMPServer::ConfirmCommunity | ( | PASN_OctetString & | community | ) | `[virtual]`

virtual PBoolean PSNMPServer::ConfirmVersion | ( | PASN_Integer | vers | ) | `[virtual]`

PBoolean PSNMPServer::HandleChannel | ( |  | ) |

void PSNMPServer::Main | ( |  | ) |

virtual PBoolean PSNMPServer::MIB_LocalMatch | ( | PSNMP_PDU & | pdu | ) | `[virtual]`

virtual PBoolean PSNMPServer::OnGetNextRequest | ( | PINDEX | reqID,
|  | PSNMP::BindingList & | vars,
|  | PSNMP::ErrorType & | errCode |
| ) |  |  | `[virtual]`

virtual PBoolean PSNMPServer::OnGetRequest | ( | PINDEX | reqID,
|  | PSNMP::BindingList & | vars,
|  | PSNMP::ErrorType & | errCode |
| ) |  |  | `[virtual]`

virtual PBoolean PSNMPServer::OnSetRequest | ( | PINDEX | reqID,
|  | PSNMP::BindingList & | vars,
|  | PSNMP::ErrorType & | errCode |
| ) |  |  | `[virtual]`

PBoolean PSNMPServer::ProcessPDU | ( | const PBYTEArray & | readBuffer,
|  | PBYTEArray & | writeBuffer |
| ) |  |  |

PSNMP::ErrorType PSNMPServer::SendGetResponse | ( | PSNMPVarBindingList & | vars | ) |

void PSNMPServer::SetVersion | ( | PASNInt | newVersion | ) |

## Member Data Documentation

PUDPSocket* PSNMPServer::baseSocket `[protected]`

PString PSNMPServer::community `[protected]`

ErrorType PSNMPServer::lastErrorCode `[protected]`

The platform independant error code.

Reimplemented from PChannel.

PINDEX PSNMPServer::lastErrorIndex `[protected]`

PThreadObj<PSNMPServer> PSNMPServer::m_thread `[protected]`

PINDEX PSNMPServer::maxRxSize `[protected]`

PINDEX PSNMPServer::maxTxSize `[protected]`

PDictionary<PRFC1155_ObjectName, PRFC1155_ObjectSyntax> PSNMPServer::objList `[protected]`

PBYTEArray PSNMPServer::readBuffer `[protected]`

PASN_Integer PSNMPServer::version `[protected]`

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

- psnmp.h