[Blitzing old outstanding messages.
Sorry for the lack of prompt response]
> I'm using net-snmp-5.0.1 on Linux.
> I wrote a program that sends a trap to a manager, but it's refused
> because of the EngineID.
I'm not sure quite what's happening as regards the engineID.
But one thing I (eventually!) noticed about your program:
> This is what I wrote in the program:
> pdu = snmp_pdu_create(SNMP_MSG_TRAP);
>
> // Send the Request out.
> status = snmp_synch_response(ss, pdu, &response);
>
> // Process the response.
> if (status == STAT_SUCCESS && response->errstat == SNMP_ERR_NOERROR)
> {
> // SUCCESS
> }
If this is a Trap-style PDU that you're sending, then there shouldn't
actually be a response. Traps are unacknowledged.
If you need a response to be returned, you should use SNMP_MSG_INFORM.
I'm also not sure that you can use SNMP_MSG_TRAP with an SNMPv3 session
anyway - that's a v1 trap, so is only valid with SNMPv1.
For SNMPv3 (or SNMPv2c) you should use SNMP_MSG_TRAP2 instead.
If pressed, I'd suspect that the engineID should be a binary value,
rather than an ASCII string. But I'm no SNMPv3 expert (which is why
I didn't really look at this query properly before now).
And it's probably much too late now anyway. Sorry about that.
Dave
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
|