Multiple snmpv2c community strings

Nagarjun G <[email protected]>
Newsgroups gmane.network.net-snmp.devel
Message-ID <CA+W2ci8A-tDVtJpDOQv0-y6T36hsO6fcrPjCdctVT-m7a1gizw@mail.gmail.com>
Hi All,

We have been using net-snmp agent in our embedded device. But we dont use
snmpd.conf file.

Right now when we configure snmp agent with v2c, we use the below API to
set the community string.

netsnmp_ds_set_string(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_COMMUNITY,
"public");

Now we need to support another manager with a different community string.

I want to add and maintain a new community string to the existing list. But
using the API twice is overwriting the community string.

I used the below API, but i could not get it working.
netsnmp_config( "rocommunity public" );
netsnmp_config( "rocommunity private" );

Also tried,
vacm_parse_rocommunity("rocommunity", "public");
vacm_parse_rocommunity("rocommunity", "private");

Am I missing something? or do I need to use a different API.
Quoting again we dont use snmpd.conf file for parsing.

Regards,
Nagarjun

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.