[AGENT++] SNMP++v3.2.10 Receiving Traps and Qt3 + some little questions

Jochen Katz katz at agentpp.com
Thu Feb 26 21:23:48 CET 2004


Hi,

> 	Hello, I have a couple of questions. I am currently working with
> Qt3 and SNMP++v3.2.10, I notice that when I create the Makefile for the
> QtExample that is provided with the code, the linking option –lsnmp++
> -L../lib appears in the Makefile. I don’t know how can I do this with my
> own project, I keep copying and pasting the linking option by my self in
> my Makefile like 1000 times a day, is there a way to do this

the following line in QtExample.pro does this job for unix-systems:
unix:LIBS += -lsnmp++ -L../lib -ltomcrypt -L../../crypt

> automatically?, that would be great. Another question is regarding the
> set_version function in the Target class, if I’m only using SNMPv1 and
> SNMPv2c (I'm not usinf SNMPv3)is necessary to set the version?, it will
> make a difference in some cases?. Finally I would like to learn how to

The default version for CTarget is version1, so you only have to set it, 
if you want to use version2c. If you call Snmp::get_bulk with a version1 
target, a GET_NEXT request will be sent.

> capture traps, I took a look at the SNMPv2.8 documentation and it
> doesn’t work, there are differences with the current code. I also took a
> look at the console examples, but I think there are some things that
> don't apply in linux so it’s very confusing. If there is somebody that

All consoleExamples are working on Linux. The only thing you will have 
to change in receive_trap.cpp is
snmp.eventListHolder->SNMPProcessEvents()
into
snmp.eventListHolder->SNMPProcessPendingEvents()
Without this change it is not possible to use the same snmp object for 
get-/set-/...requests.

Regards,
   Jochen



More information about the AGENTPP mailing list