Re: vp->magic and OID passed by snmpd

"Shivani Garg" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Thanks, that solved my problem.

On 6/21/07, Dave Shield <[email protected]> wrote:
> On 21/06/07, Shivani Garg <[email protected]> wrote:
> > struct variable7 systemInfo_variables[] = {
>
> > #define OVERALLDISKOCCUPANCYINKB  276
> >
> >     {OVERALLDISKOCCUPANCYINKB, ASN_UNSIGNED, RONLY,
> >    var_systemDiskStatsNotfyAttrTable, 4, {2, 18, 1, 1}},
>
> > }
>
> If you look at the definition of "struct variable7", you'll see that
> it starts:
>
>   struct variable7 {
>     u_char          magic;      /* passed to function as a hint */
>     :
>   }
>
> The magic number is therefore restricted to the range 0..255
>
>
>
> > In my function, when I print OID and vp->magic, OID passed is correct
> > whereas vp->magic is not 276
>
> Because this is value outside the valid range for a u_char field.
>
>
> > Any anyone give me some pointers on this.
>
> Change the #define to use a different number, less than 256.
>
> Dave
>


-- 
Warm Regards,
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.