does Net+OS support snmp version V1,V2c and V3 together?

Hi,

I’m working on my application using connectme9210 with Net OS 7.5.2 .

My application need support SNMP V1,V2c, and V3.

Digi NetOS have 2 sample for snmp mib function:
namib for snmp V1 and V2c
nsmibv3 for snmp V3
but there is no sample for all snmp version

I try to merge them to into one project, but do not work.


The problem is NetOS have 2 snmp library
libsnmp for snmp v1 and V2c
libsnmpv3 for snmp v3

if you want support all snmp version, need include both library to your project.
If include libsnmp before libsnmpv3 in this way
$(NETOS_LIBPATH)/libsnmp_no_ipsec.a
$(NETOS_LIBPATH)/libsnmpv3_no_ipsec.a \

compiler give lot of “multiple definition” errors.

If include libsnmp after libsnmpv3 in this way
$(NETOS_LIBPATH)/libsnmpv3_no_ipsec.a
$(NETOS_LIBPATH)/libsnmp_no_ipsec.a \

compile is OK,
But snmp read/write community setting do not work, it always be public for read community, and private for write community

Look like compiler do not use libsnmp, it do not have compile error, and it do not work as well.


How I can build a project can support all snmp version

Thanks

Jiaxin

No, it does not. The v2/v3 library was developed to use the same API names as V1 so if you link against both libraries, only one will be used.

Got it.

Thanks

Hi!

Dear Jiaxin, how You solve Your problem?

Thank You, and have a nice day!