I believe I'm confused on the use of MFD_SKIP. We have a table and used mib2c -c mib2c.mfd.conf to build our skeleton code. I haven't implemented one of our objects yet, so I just wanted return MFD_SKIP, to get snmpwalk to, "skip" over it. Here's a code snippet:

/**
* Extract the current value of the amccRaidIOsPerSecond data.
*
* Set a value using the data context for the row.
*
* @param rowreq_ctx
*        Pointer to the row request context.
* @param amccRaidIOsPerSecond_val_ptr
*        Pointer to storage for a u_long variable
*
* @retval MFD_SUCCESS         : success
* @retval MFD_SKIP            : skip this node (no value for now)
* @retval MFD_ERROR           : Any other error
*/
int
amccRaidIOsPerSecond_get(amccRaidControllerTable_rowreq_ctx * rowreq_ctx, u_long * amccRaidIOsPerSecond_val_ptr)
{
  /** we should have a non-NULL pointer */
   netsnmp_assert(NULL != amccRaidIOsPerSecond_val_ptr);

DEBUGMSGTL(("verbose:amccRaidControllerTable:amccRaidIOsPerSecond_get called\n"));

   netsnmp_assert(NULL != rowreq_ctx);

   return MFD_SKIP;
}

When I run snmwalk, I end up with the following (amccRaidOutstandingIOs is the _previous_ row btw, and it works):

[EMAIL PROTECTED] snmpRaid]# snmpwalk -v 2c localhost -c public 
.1.3.6.1.4.1.1458
AMCC-RAID-MIB::amccRaidAgentVersion.0 = STRING: "AMCC RAID SNMP Agent Version 1.00.00.003"
AMCC-RAID-MIB::amccRaidAPIVersion.0 = STRING: "2.00.00.084"
AMCC-RAID-MIB::amccRaidNumOfControllers.0 = Gauge32: 2
[... snip ...]
AMCC-RAID-MIB::amccRaidOutstandingIOs.2 = Gauge32: 0
Error in packet.
Reason: (genError) A general failure occured
Failed object: AMCC-RAID-MIB::amccRaidOutstandingIOs.2

[EMAIL PROTECTED] snmpRaid]#

Also, a "snmpget -v 2c localhost -c public .1.3.6.1.4.1.1458.100.10.1.20.1" on the same object returns, "Timeout: No Response from localhost."

... and snmpd -Lo -f shows:

Connection from UDP: [127.0.0.1]:32770
send response: Error building ASN.1 representation (wrong type in snmp_realloc_rbuild_var_op: 199)
Connection from UDP: [127.0.0.1]:32770
send response: Error building ASN.1 representation (wrong type in snmp_realloc_rbuild_var_op: 199)
Connection from UDP: [127.0.0.1]:32770
send response: Error building ASN.1 representation (wrong type in snmp_realloc_rbuild_var_op: 199)
Connection from UDP: [127.0.0.1]:32770
send response: Error building ASN.1 representation (wrong type in snmp_realloc_rbuild_var_op: 199)
Connection from UDP: [127.0.0.1]:32770
send response: Error building ASN.1 representation (wrong type in snmp_realloc_rbuild_var_op: 199)

Where did I got wrong?

Thanx, tom.c
--------------------------------------------------------

CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and contains information that is 
confidential and proprietary to Applied Micro Circuits Corporation or its 
subsidiaries. It is to be used solely for the purpose of furthering the 
parties' business relationship. All unauthorized review, use, disclosure or 
distribution is prohibited. If you are not the intended recipient, please 
contact the sender by reply e-mail and destroy all copies of the original 
message.


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to