Hi,
1/ I have modified as:
NOTIFICATION-TEST-MIB DEFINITIONS ::= BEGIN
IMPORTS ucdavis FROM UCD-SNMP-MIB;
demonotifs OBJECT IDENTIFIER ::= { ucdavis 991 }
demonotifs0 OBJECT IDENTIFIER ::= { demonotifs 0 }
demo-notif NOTIFICATION-TYPE
STATUS current
OBJECTS { sysLocation }
DESCRIPTION "Just a test notification"
::= { demonotifs0 9}
END
2/ Command: C:\NetSNMP\usr\bin>snmptrap -v 2c -c public localhost:199 ''
NOTIFICATION-TEST-MIB.txt::demonotifs0::demo-notif SNMPv2-MIB::sysLocation.0
s "just here"
3/ Result with -Ddump:
C:\NetSNMP\usr\bin>snmptrapd -f -Le -Ddump -c
C:\NetSNMP\usr\etc\snmp\snmptrapd
.conf -M c:/usr/share/snmp/mibs udp:127.0.0.1:199
registered debug token dump, 1
NET-SNMP version 5.4.1
dumpx_recv:02 01 01
dumpv_recv: Integer: 1 (0x01)
dumph_recv: SNMPv2c message
dumph_recv: SNMP version
dumpx_recv: 02 01 01
dumpv_recv: Integer: 1 (0x01)
dumph_recv: community string
dumpx_recv: 04 06 70 75 62 6C 69 63
dumpv_recv: String: public
dumph_recv: PDU
dumpv_recv: Command TRAP2
dumph_recv: request_id
dumpx_recv: 02 02 12 CE
dumpv_recv: Integer: 4814 (0x12CE)
dumph_recv: error status
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
dumph_recv: error index
dumpx_recv: 02 01 00
dumpv_recv: Integer: 0 (0x00)
dumph_recv: VarBindList
dumph_recv: VarBind
dumph_recv: Name
dumpx_recv: 06 08 2B 06 01 02 01 01 06 00
dumpv_recv: ObjID: SNMPv2-MIB::sysLocation.0
dumph_recv: Value
dumpx_recv: 04 09 6A 75 73 74 20 68 65 72 65
dumpv_recv: String: just here
Cannot find TrapOID in TRAP2 PDU
So still have the same error Cannot find TrapOID in TRAP2 PDU.
Thx
2010/7/29 Dave Shield <[email protected]>
> On 29 July 2010 12:22, YAHYAOUI Mohammed <[email protected]> wrote:
> > 1/ A new mib is defined to enable a notification
> >
> > NOTIFICATION-TEST-MIB DEFINITIONS ::= BEGIN
> > IMPORTS ucdavis FROM UCD-SNMP-MIB;
> > demonotifs OBJECT IDENTIFIER ::= { ucdavis 991 }
> > demo-notif NOTIFICATION-TYPE
> > STATUS current
> > OBJECTS { sysLocation }
> > DESCRIPTION "Just a test notification"
> > ::= { demonotifs 9}
> > END
>
> You probably want an intermediate entry between demonotifs and demo-notif
> Something like:
>
> demonotifs OBJECT IDENTIFIER ::= { ucdavis 991 }
> demonotifs0 OBJECT IDENTIFIER ::= { demonotifs 0 }
> demo-notif NOTIFICATION-TYPE
> :
> ::= { demonotifs0 9}
>
> But that's a fairly minor issue.
>
>
>
> > 3/ My commans is C:\NetSNMP\usr\bin>snmptrap -v 2c -c public
> localhost:199
> > '' NOTIFICATION-TEST-MIB::demo-notif SNMPv2-MIB::sysLocation.0 s "just
> here"
> >
> > My daemon is running => C:\NetSNMP\usr\bin>snmptrapd -f -Le -c
> > C:\NetSNMP\usr\etc\snmp\snmptrapd.conf -M c:/usr/share/snmp/mibs udp:
> 127.0.0.1:199
> > NET-SNMP version 5.4.1
> > Cannot find TrapOID in TRAP2 PDU
>
> Try running the trap receiver using the flag '-Ddump'
> and resend the notification. What debug output do you see?
>
> Dave
>
------------------------------------------------------------------------------
The Palm PDK Hot Apps Program offers developers who use the
Plug-In Development Kit to bring their C/C++ apps to Palm for a share
of $1 Million in cash or HP Products. Visit us here for more details:
http://p.sf.net/sfu/dev2dev-palm
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders