How to use Traps in SNMP

I’ve got my MIB working with an HTTP project and all is well, so I thought I’d try and add traps to my MIB. This falls over because when I try and build it gets lots of “multiple definitions” errors on functions like “tfSendTrapsV2”. It would appear that this is because I have included both the libsnmp.a and libsnmpv3.a

However, if I remove libsnmpv3.a it loses the function calls that are unique to that, and if I remove libsnmp.a it loses some other function calls that are unique to that.

I’ve tried setting TM_SNMP_VERSION to 3, but don’t seem to be able to set this early enough to stop warnings about redefinition of this.

Any help would be greatly appreciated.

Cheers,
Simon

You need to decide whether or not you need V3 functionality.

First, there are two books that I keep by my bedside when I am dealing with SNMP issues as follows:
Understanding SNMP MIBs by Perkins & McGinnis
SNMP, SNMPv2, SNMPv3 and RMON1 and 2 by Stallings

V3 adds security and encryption to SNMP V1 & V2. If this i snot important (meaning that community names are adequate authentication) then use libsnmp.a. If stronger authentication (user names and passwords) and potentially encryption then use libsnmpv3.a. Using both is verboten.

If you want a feel for what is involved in setting up user names and the backward compatibility for community names in SNMP V3 under NET+OS, then I’d advise looking at at the following application note on the Digi web site:

Application Note: Enabling SNMP v3 security Features in NET+Os V7.X. URL is http://ftp1.digi.com/support/documentation/snmpv3_security.pdf.
Reading this could sway yo one way or the other.