Re: vp->magic and OID passed by snmpd

This is a discussion on Re: vp->magic and OID passed by snmpd within the SNMP Coders forums, part of the Networking and Network Related category; Thanks, that solved my problem. On 6/21/07, Dave Shield <D.T.Shield@csc.liv.ac.uk> ...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-25-2007
Shivani Garg
 
Posts: n/a
Default Re: vp->magic and OID passed by snmpd

Thanks, that solved my problem.

On 6/21/07, Dave Shield <D.T.Shield@csc.liv.ac.uk> wrote:
> On 21/06/07, Shivani Garg <shivanigarg02@gmail.com> 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-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 09:17 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0