Thanks Robert,

It can work.


Br,
kaigeny

-----邮件原件-----
发件人: NetSNMP Mailbox [mailto:net-snmp-m...@freesnmp.com] 代表 Robert Story
发送时间: 2017年11月23日 16:15
收件人: YANG Kaigen <kaigen.y...@hsmoptics.com>
抄送: net-snmp-coders@lists.sourceforge.net
主题: Re: how to add trap manager dynamic in the code

On Tue, 14 Nov 2017 06:46:49 +0000 YANG wrote:
YK> I find net-snmp using configure file to configure the manager that 
YK> want receive the trap. Such as lines in snmpd.conf:
YK> 
YK>     trapsink     localhost public
YK> trap2sink    localhost public
YK> 
YK> We want using pollingTable to manage the user of the system, so the 
YK> manager will register into pollingTable, and we want add such 
YK> IP(manager) into the trap receiver list. So I want to know how to 
YK> add a IP into the list of trap receiver, not modify the configure 
YK> file and reload, just using code to dynamic add an instance.

Try:

  snmpd_parse_config_trapsink( NULL, "localhost public");
  snmpd_parse_config_trap2sink( NULL, "localhost public");
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to