Great,
if i want to send v1 trap from notification.c(see in examples), does
it mean that i don't have to use snmp_varlist_add_variable() with
ASN_OBJECT_ID?, i just need to fill netsnmp_variable_list only with
varbinds like integer or string, the trap name is not in list of
varbinds, isn't it?

Thanks,
Maxim
> 2010/3/4 Dave Shield <[email protected]>:
>> On 4 March 2010 09:04, maxim maxim <[email protected]> wrote:
>>> when i use netsnmp_send_traps(int trap, int specific, oid *
>>> enterprise, int enterprise_length,
>>> netsnmp_variable_list * vars,
>>>  // These next two are currently unused/
>>>         char * context, int flags);
>>>
>>>
>>> The  vars is a same for v1 and v2, isn't it?
>>
>> Not exactly, no.
>>
>> For SNMPv2-style notifications, the vars list is the full
>> list of varbinds, including the mandatory sysUpTime.0
>> and snmpTrapOID.0 values.
>>
>> For SNMPv1-formatted traps, the vars list is purely
>> the "payload" varbinds.   If this trap is then converted
>> into a v2-style trap, then the first two values will be
>> added automatically.
>>
>> Similarly, if a v2-style notification is converted into a v1
>> trap, then the first two varbinds will be removed, and used
>> to fill in the v1-header values.
>>
>> Remember, the SNMP version used when passing a
>> trap into the 'send_trap' family of routines is *not*
>> necessarily the version used when actually sending
>> out the notification packet.
>>
>> Dave
>>
>

------------------------------------------------------------------------------
Download Intel&#174; 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to