I have a some questions about apps/snmptrap.c:
1. Why i need a *0* in the and of oid objid_snmptrap[] = { 1, 3, 6, 1, 6,
3, 1, 1, 4, 1, *0* }; (in text format is SNMPv2-MIB::snmpTrapOID.*0*)?
2. What is a role of snmp_add() and snmp_add_var() functions?
Thanks
net-snmp-coders@lists.sourceforge.net
2010/3/2 Robert Story <rst...@freesnmp.com>
>
>
> On Tue, 2 Mar 2010 11:40:48 +0200 maxim wrote:
> MM> i new in snmp and i need explanation about a code, for example i don't
> MM> understand what is the role of callback function in the net_snmp
> structure?
>
> The library will call the call back function when messages are received,
> transports connect/disconnect, messages timeout, etc. See snmp_api.c.
>
> MM> In the snmptrap this function is snmp_input, that return 1, i don't
> MM> understand the purpose of this function?
>
> Since this function does nothing, it is likely that simply setting the
> callback function to NULL would provide the same result.
>
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders