How to add a SNMPV3 trap!

"Rainforest.P" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>

 I'm in trouble with the configuration of the snmpv3 trap.
I used create_trap_session  to add the session list in order to create the trap list. I can use SNMP_VERSION_1 and SNMP_VERSION_2C. But when i use SNMP_VERSION_3 as the param of the create_trap_session, it returns 0.
The source code is listed as follows:

    INT pdutype = SNMP_MSG_TRAP2;
    ...
    ...    
    if (SNMP_TRAP_V1 == liVersion)
    {
        pdutype = SNMP_MSG_TRAP;
    }
   else if (SNMP_VERSION_V2C != liVersion)
   {
       liVersion = SNMP_VERSION_3;
   }
    ...
    /* create a trap session and add to Session & Sinks. */
    ret = create_trap_session((CHAR *)acRemoteIp, usPort, 
                              (CHAR *)acCommunity, liVersion, pdutype); 
   ...

When the liVersion is set to  SNMP_VERSION_1 or SNMP_VERSION_2C, ret is 1. However, ret is 0 as the liVersion is set to SNMP_VERSION_3.

I'm already read the source code of net-snmp for many times. But i can't find the reason of this phenomena.

The error msg is listed as follows:

trace: snmp_synch_input(): snmp_client.c, 175:
snmp_synch: Response (ReqID: 711633531 - Cmd 160)
trace: snmpv3_engineID_probe(): snmp_api.c, 1396:
snmp_sess_open: unable to connect with remote engine: Timeout (-24)
trace: snmpv3_engineID_probe(): snmp_api.c, 1402:
snmp_api: unable to determine remote engine ID
snmp_sess_add: engine ID probe failed
snmpd: create_trap_session: Timeout

Help!





2012-05-15 



Rainforest.Peng  |  Software Engineer 
SHENZHEN TENDA TECHNOLOGY CO.,LTD

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
tl.gif (image/gif, 802 B) - not displayed
spacer.gif (image/gif, 43 B) - not displayed
ml.gif (image/gif, 2.2 KB) - not displayed
dr.gif (image/gif, 240 B) - not displayed
m_tl.gif (image/gif, 1.2 KB) - not displayed
m_bg.gif (image/gif, 250 B) - not displayed
m_tr.gif (image/gif, 1.1 KB) - not displayed
m_bgl.gif (image/gif, 360 B) - not displayed
bg.gif (image/gif, 64 B) - not displayed
m_bgr.gif (image/gif, 344 B) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.