trap initializing ----what is the " /* insert index here */ " meaning?

"Alexander King" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
I really think it is a very junior problem.the question much clear like below:

int
send_fcPorttrap_trap( void )
{
    netsnmp_variable_list  *var_list = NULL;
    oid fcPorttrap_oid[] = { 1,3,6,1,4,1,30901,2090,2092,0,1 };
    oid fcPort_oid[] = { 1,3,6,1,4,1,30901,2090,7000,2,1,2,1,1,1, /* insert index here */ };

//the fcPorttrap is a child of a table,what is the " /* insert index here */" meaning here? how to initializ it ?

    /*
     * Set the snmpTrapOid.0 value
     */
    snmp_varlist_add_variable(&var_list,
        snmptrap_oid, OID_LENGTH(snmptrap_oid),
        ASN_OBJECT_ID,
        fcPorttrap_oid, sizeof(fcPorttrap_oid));
    
    /*
     * Add any objects from the trap definition
     */
    snmp_varlist_add_variable(&var_list,
        fcPort_oid, OID_LENGTH(fcPort_oid),
        ASN_OCTET_STR,
        /* Set an appropriate value for fcPort */
        NULL, 0);

    /*
     * Add any extra (optional) objects here
     */

    /*
     * Send the trap to the list of configured destinations
     *  and clean up
     */
    send_v2trap( var_list );
    snmp_free_varbind( var_list );

    return SNMP_ERR_NOERROR;
}















 
 
------------------ Original ------------------
From:  "Thomas Anders"<[email protected]>;
Date:  Mon, Feb 1, 2010 08:30 AM
To:  "net-snmp-coders"<[email protected]>; 

Subject:  trap sending problems with TCP?

 
 Running

 make test TESTOPTS="-P tcp"

in trunk (and probably the branches, too) fails for some of the trap sending tests:

27: testing snmpv1 traps are sent by snmpd API... FAIL
28: testing snmpv2c traps are sent by snmpd API... FAIL
29: testing snmpv1 traps are sent by snmpd without notification mib support... FAIL
30: testing snmpv2c traps are sent by snmpd without notification mib support... FAIL
46: testing AgentX trap sending support... FAIL
47: testing AgentX trap sending support using agentxtrap... FAIL

(27-30,46 will be SKIPPED if you don't have the examples/example mib module, mind you)

Checking the logs for test 47 reveals error messages like:

 send_trap: v2 trapOID too short (2)
 send_trap: failed to convert v2->v1 template PDU

Do we have a problem with the test scripts or with trap sending over a streamed transport itself?

+Thomas

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com

_______________________________________________
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
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.