[AGENT++] example application sending traps
Alona Rossen
arossen at opentext.com
Fri Feb 24 20:53:55 CET 2012
Please ignore my request for assistance. I have got it working and sending traps.
-----Original Message-----
From: Alona Rossen
Sent: February 24, 2012 12:01 PM
To: 'Jochen Katz'; 'agentpp at agentpp.org'
Subject: RE: [AGENT++] example application sending traps
agent.cpp
MibTableRow* row = snmpCommunityEntry::instance->
add_row(Oidx::from_string(co, FALSE));
snmpCommunityEntry::instance is a NULL ptr.
Regards,
Alona
-----Original Message-----
From: Alona Rossen
Sent: February 24, 2012 11:10 AM
To: 'Jochen Katz'; 'agentpp at agentpp.org'
Subject: RE: [AGENT++] example application sending traps
Hi Jochen,
First, regarding the unresolved symbols. This is a VC++ compiler issue and those static classes required instantiation. The following code did the trick:
LockQueue * Request::lockQueue = NULL;
LogEntry * DefaultLog::entry = NULL;
Mib * Mib::instance = NULL;
snmpCommunityEntry * snmpCommunityEntry::instance = NULL;
When I try to run the application without arguments, I receive the following errors:
20120224.11:01:57: 7420: (1)DEBUG : Initialized request_id to 1041.
20120224.11:02:03: 7420: (1)EVENT : main: SNMP listen port: (4700)
20120224.11:02:24: 7420: (5)INFO : saveBootCounter: Saved counter (file) (engi
ne id) (boot): (snmpv3_boot_counter), ( 80 00 13 70 05 61 62 6F 67 6F 6C 75 62
6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
), (4)
20120224.11:02:40: 7420: (3)INFO : AuthPriv: Added default Auth and Priv proto
cols.
20120224.11:04:02: 7420: (1)DEBUG : UsmUserTable: add row with index: (21.128.0
.19.112.5.97.98.111.103.111.108.117.98.111.118.48.48.49.49.18.92.12.117.110.115.
101.99.117.114.101.85.115.101.114)
20120224.11:04:02: 7420: (1)DEBUG : USM::get_user: user (unsecureUser) engine_i
d ( 80 00 13 70 05 61 62 6F 67 6F 6C 75 62 6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
)
20120224.11:04:02: 7420: (1)DEBUG : Informing agent++ about newly created user
20120224.11:04:02: 7420: (1)DEBUG : UsmUserTable: add row with index: (21.128.0
.19.112.5.97.98.111.103.111.108.117.98.111.118.48.48.49.49.18.92.3.77.68.53)
20120224.11:04:02: 7420: (1)DEBUG : USM::get_user: user (MD5) engine_id ( 80 0
0 13 70 05 61 62 6F 67 6F 6C 75 62 6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
)
20120224.11:04:02: 7420: (1)DEBUG : Informing agent++ about newly created user
20120224.11:04:02: 7420: (1)DEBUG : UsmUserTable: add row with index: (21.128.0
.19.112.5.97.98.111.103.111.108.117.98.111.118.48.48.49.49.18.92.3.83.72.65)
20120224.11:04:02: 7420: (1)DEBUG : USM::get_user: user (SHA) engine_id ( 80 0
0 13 70 05 61 62 6F 67 6F 6C 75 62 6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
)
20120224.11:04:02: 7420: (1)DEBUG : Informing agent++ about newly created user
20120224.11:04:02: 7420: (1)DEBUG : UsmUserTable: add row with index: (21.128.0
.19.112.5.97.98.111.103.111.108.117.98.111.118.48.48.49.49.18.92.6.77.68.53.68.6
9.83)
20120224.11:04:02: 7420: (1)DEBUG : USM::get_user: user (MD5DES) engine_id ( 8
0 00 13 70 05 61 62 6F 67 6F 6C 75 62 6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
)
20120224.11:04:02: 7420: (1)DEBUG : Informing agent++ about newly created user
20120224.11:04:02: 7420: (1)DEBUG : UsmUserTable: add row with index: (21.128.0
.19.112.5.97.98.111.103.111.108.117.98.111.118.48.48.49.49.18.92.6.83.72.65.68.6
9.83)
20120224.11:04:02: 7420: (1)DEBUG : USM::get_user: user (SHADES) engine_id ( 8
0 00 13 70 05 61 62 6F 67 6F 6C 75 62 6F 76 30 ...p.abogolubov0
30 31 31 12 5C 011.\
)
20120224.11:04:02: 7420: (1)DEBUG : Informing agent++ about newly created user
20120224.11:04:02: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (3)
20120224.11:04:02: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (3)
20120224.11:04:02: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (9)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (9)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (4)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (4)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (20
)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (20
)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (21
)
20120224.11:04:03: 7420: (1)ERROR : UsmUserTable: Unsupported privProtocol: (21
)
Oidx Oidx::from_string(const OctetStr& str, boolean withLength) returns NULL pointer and then the application quietly exits.
Please kindly explain what is going wrong.
Thank you,
Alona
-----Original Message-----
From: Jochen Katz [mailto:katz at agentpp.com]
Sent: February 9, 2012 4:22 PM
To: Alona Rossen
Cc: 'agentpp at agentpp.org'
Subject: Re: [AGENT++] example application sending traps
Hi,
> Thank you, Jochen. It worked. Any ideas about other 3 unresolved
> externals?
only some generic advice: Check that the settings of all projects are
the same and do a complete cleanup and rebuild of everything.
Regards,
Jochen
>> 1>agent.obj : error LNK2001: unresolved external symbol "public: static class snmpCommunityEntry * snmpCommunityEntry::instance" (?instance at snmpCommunityEntry@@2PAV1 at A)
>> 1>agent.obj : error LNK2001: unresolved external symbol "protected: static class LogEntry * DefaultLog::entry" (?entry at DefaultLog@@1PAVLogEntry@@A)
>> 1>agentpp_notifytest_mib.obj : error LNK2001: unresolved external symbol "protected: static class LogEntry * DefaultLog::entry" (?entry at DefaultLog@@1PAVLogEntry@@A)
>> 1>agentpp_notifytest_mib.obj : error LNK2001: unresolved external symbol "public: static class Mib * Mib::instance" (?instance at Mib@@2PAV1 at A)
More information about the AGENTPP
mailing list