Fwd: vp->magic and OID passed by snmpd

"Shivani Garg" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Sincere Apologies..
I copied the wrong error in my last mail..

I error I get is:
RFC1155-SMI::enterprises.6305.1.10.1.2.1.2.18.1.1.1 = No Such Instance
currently exists at this OID

---------- Forwarded message ----------
From: Shivani Garg <[email protected]>
Date: Jun 21, 2007 4:35 PM
Subject: vp->magic and OID passed by snmpd
To: [email protected],
[email protected]


Greetings to all.

I am using the code generated by mib2c for my MIB file. It contains an array
like this.. :

*oid systemInfo_variables_oid[] = { 1, 3, 6, 1, 4, 1, 6305, 1, 10, 1, 2, 1
};*
*struct variable7 systemInfo_variables[] = {*
*.*
*.*
*.*
*/* Out of all the elements of array, one is below, pasting only relevant
code here */*

*#define OVERALLDISKOCCUPANCYINKB  276*

*    {OVERALLDISKOCCUPANCYINKB, ASN_UNSIGNED, RONLY,
   var_systemDiskStatsNotfyAttrTable, 4, {2, 18, 1, 1}},*

*.*

*.*

*.*

*}*



When I fire a snmpget for OID 1.3.6.1.4.1.6305.1.10.1.2.1.2.18.1.1.1, I get
an error like this:

RFC1155-SMI::enterprises.6305.1.10.1.2.1.2.18.1.2.1 = No Such Instance
currently exists at this OID

In my function, when I print OID and vp->magic, OID passed is correct
whereas vp->magic is not 276 and hence the relevant case for the switch
statement is not hit. snmpd calls var_systemDiskStatsNotfyAttrTable with
incorrect vp->magic. Any anyone give me some pointers on this... I have
copied the relevant code below:

*/*
 * var_systemDiskStatsNotfyAttrTable():
 *   Handle this table separately from the scalar value case.
 *   The workings of this are basically the same as for var_systemInfo
above.
 */
unsigned char *
var_systemDiskStatsNotfyAttrTable (struct variable *vp,
       oid * name,
       size_t * length,
       int exact,
       size_t * var_len,
       WriteMethod ** write_method)
{
.*

*.*

*switch (vp->magic)
     {
     case OVERALLDISKOCCUPANCYINKB:
          VAR = (int*)&p_resp->overall_disk_occupancy; /* XXX **

*     default:*

*        ERROR_MSG(" ");*

*      }*

*.*

*.*

*}*

Thanks a lot in advance for your help.

Shivani

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

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