2008/7/7 Tewen Hsieh <[EMAIL PROTECTED]>:
> Question 1:
> All these three tables are used to store *trap* destination and
> configuration information,
Yes - that is what you asked about.
> which table is used to store *manager's* ip and
> configuration information (manager means the NMS
> which send get/set requests to agent)?
Access control is handled by the VACM tables - i.e. those
in the SNMP-VIEW-BASED-ACM-MIB
Note that these settings do *not* include IP address
information. SNMPv3 requests are source-independent,
and cannot be filtered by IP address. SNMPv1/2c
requests can be filtered by IP address, but this is done
by a private internal mechanism, and is not configurable
remotely.
> Question 2:
> In targetAddrTable_struct, there is an entry *sess*, but I can't find code
> to fill it in mibgroup/target/snmpTargetAddrEntry.c. So it is filled by
> agent automatically?
Yes - I think so.
> Question 3:
> So there is not a *global* community table to store community name and
> privilege(rw/ro) both for trap receivers and managers?
See the FAQ entries discussing access control.
These tables are used by both the Net-SNMP trap receiver (snmptrapd)
and agent (snmpd) to decide whether to accept an incoming request.
snmptrapd uses a different context ("snmptrapd") - snmpd uses the
default context ("").
> Question 4:
> So I need a *thread* to keep checking (while(1) {...}) incoming messages
> from external application(CLI) to know when to read new configure? Or
> snmp_alarm_registaer will be a better choice? Which one will affect the
> performance of agent *less*?
I have little or no experience with multi-threaded programming,
and no time to investigate. Sorry - I can't help with that question.
> Question 5:
> Is read/write snmpd.conf better than manipulate the data structures
> directly?
It's probably safer to use the standard config directive processing
routines, rather than trying to manipulate the data structures directly.
Either update the snmpd.conf file and trigger a re-load,
or call "netsnmp_config()" with the config directive you
want to apply
> But how can I make agent reload snmpd.conf after I modify trap
> destination and configuration information (manager's ip and configuration
> information ) without restart agent?
$ man snmpd.conf
[snip]
NOTES
o The Net-SNMP agent can be instructed to re-read the various con-
figuration files, either .....
To find out the answer, I suggest you read the documentation :-)
Dave
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders