On 2 March 2010 18:39, maxim maxim <look200...@gmail.com> wrote: > 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)?
Because you are assigning a value to the (sole) instance of the scalar object SNMPv2-MIB::snmpTrapOID. All scalar instances have the instance subidentifier '0' > 2. What is a role of snmp_add() and snmp_add_var() functions? "snmp_add" creates an SNMP session to the specified destination. It would probably more typically use "snmp_open" or "snmp_sess_open" "snmp_add_var" takes a PDU structure, and adds the specified varbind to the payload. This is used for building up the SNMP request, before sending it to the destination. Dave ------------------------------------------------------------------------------ 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