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> ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|