(file) Return to snmpIndicationHandler.cpp CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Handler / snmpIndicationHandler

Diff for /pegasus/src/Pegasus/Handler/snmpIndicationHandler/snmpIndicationHandler.cpp between version 1.40 and 1.46

version 1.40, 2008/12/01 17:50:39 version 1.46, 2013/07/01 10:55:54
Line 43 
Line 43 
 # include "snmpDeliverTrap_emanate.h" # include "snmpDeliverTrap_emanate.h"
 #elif defined (PEGASUS_USE_NET_SNMP) #elif defined (PEGASUS_USE_NET_SNMP)
 # include "snmpDeliverTrap_netsnmp.h" # include "snmpDeliverTrap_netsnmp.h"
 #else  
 # include "snmpDeliverTrap_stub.h"  
 #endif #endif
  
 #include <Pegasus/Common/MessageLoader.h> #include <Pegasus/Common/MessageLoader.h>
Line 62 
Line 60 
     _snmpTrapSender = new snmpDeliverTrap_emanate();     _snmpTrapSender = new snmpDeliverTrap_emanate();
 #elif defined (PEGASUS_USE_NET_SNMP) #elif defined (PEGASUS_USE_NET_SNMP)
     _snmpTrapSender = new snmpDeliverTrap_netsnmp();     _snmpTrapSender = new snmpDeliverTrap_netsnmp();
 #else  
     _snmpTrapSender = new snmpDeliverTrap_stub();  
 #endif #endif
  
     PEG_METHOD_EXIT();     PEG_METHOD_EXIT();
Line 222 
Line 218 
         Uint32 securityNamePos =         Uint32 securityNamePos =
             handler.findProperty(CIMName("SNMPSecurityName"));             handler.findProperty(CIMName("SNMPSecurityName"));
         Uint32 engineIDPos = handler.findProperty(CIMName("SNMPEngineID"));         Uint32 engineIDPos = handler.findProperty(CIMName("SNMPEngineID"));
           Uint32 snmpSecLevelPos =
               handler.findProperty(CIMName("SNMPSecurityLevel"));
           Uint32 snmpSecAuthProtoPos =
               handler.findProperty(CIMName("SNMPSecurityAuthProtocol"));
           Uint32 snmpSecAuthKeyPos =
               handler.findProperty(CIMName("SNMPSecurityAuthKey"));
           Uint32 snmpSecPrivProtoPos =
               handler.findProperty(CIMName("SNMPSecurityPrivProtocol"));
           Uint32 snmpSecPrivKeyPos =
               handler.findProperty(CIMName("SNMPSecurityPrivKey"));
  
         if (targetHostPos == PEG_NOT_FOUND)         if (targetHostPos == PEG_NOT_FOUND)
         {         {
Line 272 
Line 278 
             Uint16 targetHostFormat = 0;             Uint16 targetHostFormat = 0;
             Uint16 snmpVersion = 0;             Uint16 snmpVersion = 0;
             Uint32 portNumber;             Uint32 portNumber;
               Uint8 snmpSecLevel = 1; // noAuthnoPriv
               Uint8 snmpSecAuthProto = 0;
               Array<Uint8> snmpSecAuthKey;// no key
               Uint8 snmpSecPrivProto = 0;
               Array<Uint8> snmpSecPrivKey ;// no key
  
             String trapOid;             String trapOid;
             Boolean trapOidAvailable = false;             Boolean trapOidAvailable = false;
Line 388 
Line 399 
                 handler.getProperty(engineIDPos).getValue().get(engineID);                 handler.getProperty(engineIDPos).getValue().get(engineID);
             }             }
  
               if(snmpVersion == 5) // SNMPv3 Trap
               {
                   //fetch the security data
                   if(snmpSecLevelPos != PEG_NOT_FOUND)
                   {
                       handler.getProperty(snmpSecLevelPos).getValue(). \
                           get(snmpSecLevel);
                   }
                   if(snmpSecAuthProtoPos != PEG_NOT_FOUND)
                   {
                       handler.getProperty(snmpSecAuthProtoPos).getValue(). \
                           get(snmpSecAuthProto);
                   }
                   if(snmpSecAuthKeyPos != PEG_NOT_FOUND)
                   {
                       handler.getProperty(snmpSecAuthKeyPos).getValue(). \
                           get(snmpSecAuthKey);
                   }
                   if(snmpSecPrivProtoPos != PEG_NOT_FOUND)
                   {
                       handler.getProperty(snmpSecPrivProtoPos).getValue(). \
                           get(snmpSecPrivProto);
                   }
                   if(snmpSecPrivKeyPos!= PEG_NOT_FOUND)
                   {
                       handler.getProperty(snmpSecPrivKeyPos).getValue(). \
                           get(snmpSecPrivKey);
                   }
               }
   
             PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,             PEG_TRACE ((TRC_INDICATION_GENERATION, Tracer::LEVEL4,
                "snmpIndicationHandler sending %s Indication trap %s to target"                "snmpIndicationHandler sending %s Indication trap %s to target"
                " host %s target port %d",                " host %s target port %d",
Line 404 
Line 445 
                 portNumber,                 portNumber,
                 snmpVersion,                 snmpVersion,
                 engineID,                 engineID,
                   snmpSecLevel,
                   snmpSecAuthProto,
                   snmpSecAuthKey,
                   snmpSecPrivProto,
                   snmpSecPrivKey,
                 propOIDs,                 propOIDs,
                 propTYPEs,                 propTYPEs,
                 propVALUEs);                 propVALUEs);


Legend:
Removed from v.1.40  
changed lines
  Added in v.1.46

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2