version 1.1, 2005/11/16 18:48:38
|
version 1.3.10.1, 2006/07/27 23:12:03
|
|
|
//%2005//////////////////////////////////////////////////////////////////////// |
//%2006//////////////////////////////////////////////////////////////////////// |
// | // |
// Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development | // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development |
// Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. | // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. |
|
|
// IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. |
// Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; | // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
// EMC Corporation; VERITAS Software Corporation; The Open Group. | // EMC Corporation; VERITAS Software Corporation; The Open Group. |
|
// Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.; |
|
// EMC Corporation; Symantec Corporation; The Open Group. |
// | // |
// Permission is hereby granted, free of charge, to any person obtaining a copy | // Permission is hereby granted, free of charge, to any person obtaining a copy |
// of this software and associated documentation files (the "Software"), to | // of this software and associated documentation files (the "Software"), to |
|
|
{ | { |
public: | public: |
| |
|
void initialize(); |
|
|
|
void terminate(); |
|
|
void deliverTrap( | void deliverTrap( |
const String& trapOid, | const String& trapOid, |
const String& securityName, | const String& securityName, |
|
|
| |
private: | private: |
| |
|
// Mutex is needed before a session is created. Sessions created |
|
// using the Single API do not interact with other SNMP sessions. |
|
Mutex _sessionInitMutex; |
|
|
/** | /** |
Creates a SNMP session. | Creates a SNMP session. |
| |
|
|
to receive a trap | to receive a trap |
@param portNumber the port number to receive a trap | @param portNumber the port number to receive a trap |
@param securityName the human readable community name | @param securityName the human readable community name |
@param snmpSession the SNMP session |
|
@param sessionHandle an opaque pointer of the SNMP session | @param sessionHandle an opaque pointer of the SNMP session |
@param sessionPtr the SNMP session pointer to its associated | @param sessionPtr the SNMP session pointer to its associated |
struct snmp_session | struct snmp_session |
|
|
void _createSession(const String & targetHost, | void _createSession(const String & targetHost, |
Uint32 portNumber, | Uint32 portNumber, |
const String & securityName, | const String & securityName, |
struct snmp_session & snmpSession, |
|
void *&sessionHandle, | void *&sessionHandle, |
struct snmp_session *&sessionPtr); | struct snmp_session *&sessionPtr); |
| |