Hi Dave,
Thanks for your response so far.
Actually, the final problem is in comparing the engine-id received in UDP
packet with that in user database.
If I send engine-id using command:
snmptrap -e *0x0102030405* -v 3 -u administrator -a MD5 -A mypassword -l
authNoPriv -d localhost 42 coldStart.0
This is stored in u_char * engine_id as engine_id[0] = 0x01
engine_id[1] = 0x02
engine_id[2] = 0x03
engine_id[3] = 0x04
engine_id[4] = 0x05
and the length is *5*.
Whereas, the engine-id we store in user database is session.engineId =
"0x0102030405" and length is 12.
Please let me know where I am going wrong. I think some conversion is
required.
Thanks in advance.
- Gaurav
On Wed, Jul 21, 2010 at 7:04 PM, Dave Shield <d.t.shi...@liverpool.ac.uk>wrote:
> On 21 July 2010 14:22, Gaurav Chaturvedi <gauravchaturve...@gmail.com>
> wrote:
> > The actual value contains the characters I cannot type using keyboard and
> > even can't copy (like 5 squares). So, it is very difficult to provide you
> > the same.
>
> The engine ID is a binary string, so I wouldn't expect it to be printable.
> But you should be able to print the individual byte values
> i.e. secEngineID[0], secEngineID[1], etc
>
> If you print these as decimal or hex values, that would give the
> information
> we need.
>
> Also, if you include the following code in your trap receiver:
>
> netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
> NETSNMP_DS_LIB_DUMP_PACKET, 1);
>
> this would display the raw packets as are received.
> This might also give some indication as to what is happening.
>
>
>
> > Can you also tell me the procedure to implement/contribute enhancements
> in
> > net-snmp code.
>
> If you go to the project web site (www.net-snmp.org), under the heading
> "Support" there are links to the Bug and Patches trackers. These can
> be used to log problem reports and enhancements.
>
> Dave
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users