On 09/11/06, Venkata Guddeti <[EMAIL PROTECTED]> wrote:
> Dear Dave and other Net-SNMP coders,
> I am using Net-snmp 5.3.1 on 64 bit RHEL 4 linux os. My code is subagent.
> I have been trying to debug the agent crash while sending a v2 trap. The
> stack trace shows that the args for send_enterprise_trap_vars are not as
> they are supposed to be. I think that the first two values should be -1, but
> they have different values.
No - it's quite reasonable for these two values to be other than -1.
This is used to specify a trap in SNMPv1 style.
However, the first parameter should be in the range 0-6,
and the second parameter should be 0, for everything other than
enterprise specific (i.e. trap=6) traps.
> #5 0x0000000000446293 in send_enterprise_trap_vars
> (trap=9, specific=10810384, enterprise=0x210,
> enterprise_length=-1, vars=0x0) at agent_trap.c:804
trap=9 is not valid.
> I am using send_v2trap function which basically
> calls the above function. I have given the stack trace for reference.
Err... the stack trace doesn't actually mention 'send_v2trap()'.
Something very strange is going on.
> I have few questions:
> 1. Should I be using the send_enterprise_trap_vars directly instead of
> send_v2trap.
No - either should be OK.
> 2. I have not defined enterprise OID in the snmpd.conf and I have not
> compiled with that enterprise option. Would this be a problem.
No - things will default to the Net-SNMP enterprise OID.
> I always use v2 traps.
So you'll be specifying the trap OID explicitly anyway.
In which case, the enterprise OID is pretty much irrelevant anyway,
> 3. My snmpd.conf file has the line
> trap2sink <dest-host-address-here> <community-string> 162.
> Is this right?
Should be OK, yes.
Or you could try
trap2sink dest-address:162 community
But the two should have identical effect.
Dave
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders