Hi Vesa,

I think the reason that you aren't getting any response is that most people
who integrate net-snmp into their system use the configuration file and
SIGHUP / snmpd restart to load changes.  With SIGHUP the authentication
info gets cleared out and re-read from the config file.

If you're creating new APIs, I would think about the data structure that's
actually used - e.g., com2secList: split out netsnmp_udp_parse_security()
into two halves: the half that parses the string and the half that adds is
to the list, and you can use the latter half in your code.

There has been no need to free an individual entry, since the normal
reconfiguration path via the configuration file starts
with netsnmp_udp_com2SecList_free() (i.e., free the whole list) and then
re-reads the whole configuration file and re-creates all of the relevant
entries.

  Bill


On Wed, Oct 29, 2014 at 10:41 PM, Vesa Jääskeläinen <dach...@gmail.com>
wrote:

> Hi,
>
> Perhaps I sent this email to wrong audience first, so here is resend
> to coders ml.
>
> I need to implement feature that allows on the fly modification to
> community names.
>
> I have been using "dlmod" feature to load my own extension plugin to
> snmpd process and do every other custom OID and necessarily operation
> from there.
>
> vacm_parse_rocommunity and vacm_parse_rwcommunity (eventually
> vacm_create_simple) seems to be callbacks for configuration file
> parser that eventually adds the community names and other
> configurations for those into the system.
>
> These are not callable from extension plugin. Also there is no
> matching remove/clear operations even if I would export those.
>
> Next thing would of course be to use the real operations behind this
> to manage the entries.
>
> Problem becomes from fact that I would need to use:
> vacm_gen_com2sec, netsnmp_udp_parse_security, netsnmp_udp6_parse_security
>
> vacm_gen_com2sec is local static function. Functionality in here could
> be broken to pieces so that can be handled by splitting to calling of
> netsmp_udp/udp6_parser_security and vacm_createGroupEntry.
>
> Those all would be exportable so I could call them. Then next step
> would be removing entries so that new entries could replace them. This
> functionality is not exported (and there is only
> netsnmp_udp_com2SecList_free).
>
> In theory I could go and modify the net-snmp that we use but calling
> those functions does not sound clean solution for the management of
> the community names.
>
> So I would like to get advice what should be modified (preferably so
> that we can upstream the change) to enable community name management.
>
> Also community names do not have get-list feature like other items in vacm
> has.
>
> Thanks,
> Vesa Jääskeläinen
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Net-snmp-coders mailing list
> Net-snmp-coders@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to