On 10 April 2010 15:09, maxim maxim <[email protected]> wrote:
> I can't understand why if i don't begin to add to my variable list
> from ASN_OBJECT_ID it doesn't work

There's not really enough detail in the code fragment you gave
to be clear about exactly what you are trying to do.

But if you are using 'snmp_v2trap'  (as in the example code in
'examples/notification.c', then the first varbind *MUST* be an
assignment to snmpTrap.0 - which takes an OBJECT ID value.

This can then be _followed_ by other varbinds, such as the
heartbeat rate that you show.

But the *first* varbind must be an OBJECT ID assignment to
snmpTrap.0 - that's part of the structure of an SNMPv2 notification.
    (Well, strictly speaking the first varbind should be
     'sysUpTime.0', but that's handled automatically by
     the agent trap generation code.   The first varbind
     in the list passed to send_v2trap must be snmpTrap.0)


See the code in 'examples/notification.c', or generated by
'mib2c.notify.conf' for examples of how this should look.

If that's not what you mean, then you'll have to be more explicit.

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