PTLib
Version 2.14.3
|
Class which supplies SNMP data. More...
#include <psnmp.h>
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 |
PBYTEArray | readBuffer |
PINDEX | maxRxSize |
PINDEX | maxTxSize |
PUDPSocket * | baseSocket |
PDictionary < PRFC1155_ObjectName, PRFC1155_ObjectSyntax > | objList |
Additional Inherited Members | |
![]() | |
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 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) |
![]() | |
virtual PBoolean | OnOpen () |
This callback is executed when the Open() function is called with open channels. More... | |
![]() |
Class which supplies SNMP data.
PSNMPServer::PSNMPServer | ( | PIPSocket::Address | binding = PIPSocket::GetDefaultIpAny() , |
WORD | localPort = 161 , |
||
PINDEX | timeout = 5000 , |
||
PINDEX | rxSize = 10000 , |
||
PINDEX | txSize = 10000 |
||
) |
PSNMPServer::~PSNMPServer | ( | ) |
|
virtual |
|
virtual |
|
virtual |
PBoolean PSNMPServer::HandleChannel | ( | ) |
void PSNMPServer::Main | ( | ) |
|
virtual |
|
virtual |
|
virtual |
PBoolean PSNMPServer::ProcessPDU | ( | const PBYTEArray & | readBuffer, |
PBYTEArray & | writeBuffer | ||
) |
PSNMP::ErrorType PSNMPServer::SendGetResponse | ( | PSNMPVarBindingList & | vars | ) |
void PSNMPServer::SetVersion | ( | PASNInt | newVersion | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |