PSNMPServer Class Reference

Class which supplies SNMP data. More...

#include <psnmp.h>

Inheritance diagram for PSNMPServer:

PSNMP PThread PIndirectChannel PChannel PObject 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 ()
 User override function for the main execution routine of the thread.
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

PString community
PASN_Integer version
PINDEX lastErrorIndex
ErrorType lastErrorCode
 The platform independant error code.
PBYTEArray readBuffer
PINDEX maxRxSize
PINDEX maxTxSize
PUDPSocketbaseSocket
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]

User override function for the main execution routine of the thread.

A descendent class must provide the code that will be executed in the thread within this function.

Note that the correct way for a thread to terminate is to return from this function.

Implements PThread.

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]

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:
Generated on Fri Oct 14 01:44:13 2011 for PTLib by  doxygen 1.4.7