Re: (Previous email had a weird formatting) Custom Mib returning wrong values when Magic number is larger than 255

Neeraj Bansal <[email protected]> Fri, 31 Jan 2025 12:55:00 -0800
Newsgroups gmane.network.net-snmp.devel
Message-ID <CAP2FjR3+GkQ7b1dGuq2gz2cZtTTfN9XuWNer15=wEM6JGTLphw@mail.gmail.com>
--===============0764190094970265178==
Content-Type: multipart/alternative; boundary="0000000000002ba906062d06c254"

--0000000000002ba906062d06c254
Content-Type: text/plain; charset="UTF-8"

Thank you for the suggestions. Based on your suggestion, we were trying
different things and figured out a way to make it work.

One of the first things we did was, remove all the warnings since there
were a lot. Then we saw that the compiler was telling us that there are
more than 255 variables which is more than the vp->magic variable can store.

One of the other thing we tested was, if we can see all the OIDs with
"name" variable with the following code:

// Find the OID to match
    memset(tmpsql,0, sizeof(tmpsql));
    memset(buf,0, sizeof(buf));
    for (z = 0; z < *length; z++)
    {
        res = snprintf(buf, sizeof(buf), "%u",name[z]);
        strcat(tmpsql, buf);
        if(z < *length - 1)
        {
            strcat(tmpsql, ".");
        }
    }

// tmpsql contains the OID, match it in a switch case
    for (size_t i = 0; i < NUM_ENTRIES; i++)
    {
        if (strcmp(oidlookupTable[i].oid, tmpsql) == 0)
        {
            matched_code = oidlookupTable[i].device_type;
            break;
        }
    }

And we thought, we can use the OIDs to match up all the data points and
that's what we used in the switch statement. We added a struct as follows
and defined all our variables, which uses the previously defined variables
in header file.

typedef struct OidEntry {
    const char *oid;
    int device_type;
} OidEntry;

This solution seems to work for us and now we can add as many variables as
we want. I hope this solution can help someone else as well.

And again, thank you for your response Craig.

- Neeraj

On Fri, 11 Oct 2024 at 00:16, Craig Small <[email protected]> wrote:

> Hi,
>   You can definitely have more than 255 custom OIDs, the trick is you only
> have 255 values for magic. I'm surprised hacking the magic value didn't
> crash it before.
>
> There's probably a few options; the good, the bad and the ugly.
>
> Good
> Rebuild the MIB and functions so each type of variable uses a different
> accessor function, so testboard_var becomes testboard_load,
> testboard_temperature etc.
> As long as you don't have 256 temperature sensors or load sensors or same
> things this works. If you have different ways of getting values, it also
> means the
> functions are simpler/smaller because the temperature getter has no code
> for working out system load and vice-versa. It also means you're not
> bothering to fetch the
> temperature when you want to get the load too.
>
> Bad
> Keep the mib as it is, but have several accessor functions which have a
> different magic which you add to the parameters passed to the real accessor.
> Your testboard_var() will need a new parameter, say mymagic which is
> something larger than u_char
>
> testboard_var1(vp, other variables)
>   return (testboard_var(vp->magic, vp, other variables)
> testboard_var2(vp, other_variables)
>   return (testboard_var(vp->magic+256, vp, other_variables)
> testboard_var3(vp, other_variables)
>   return (testboard_var(vp->magic+512, vp, other_variables)
> In your variables array the ones that use 1-255 use testboard_var1,
> 256-511 use testboard_var2 (but use magic-256) etc.
>
> Ugly
> Overload or ignore the magic and match on the OID directly, which is
> called vp->name. There's a reason why this is the ugly option.
>
>  - Craig
>
>
> On Sat, 21 Sept 2024 at 05:24, Neeraj Bansal <[email protected]>
> wrote:
>
>> That makes sense Craig. Thank you for your input.
>>
>> To summarize the issue, we are unable to use more than 255 OID entries
>> and would love to get any help on this issue.
>>
>> Is there another way to use more than 255 custom OID's?
>>
>> Thank You to anyone looking into this matter.
>>
>> - Neeraj
>>
>> On Mon, 29 Jul 2024 at 14:26, Craig Small <[email protected]> wrote:
>>
>>> On Fri, 12 Jul 2024 at 08:31, Neeraj Bansal <[email protected]>
>>> wrote:
>>> > We recompile everything and install no problem, but instead of fixing
>>> our problem it caused net-snmp-5.9.3 to not be able to start. The error it
>>> gives is: Bad user id, which could be a red herring. example below:
>>> > [root@testboard: /root# /etc/init.d/S59netsnmp restart
>>> > Stopping SNMP daemon: [OK]
>>> > Starting SNMP daemon: Bad user id: snmp
>>> I think it is a red herring, that error is from the -u option.
>>>
>>> # /usr/sbin/snmpd -u blah
>>> Bad user id: blah
>>>
>>> I know that is not solving your main issue, but its got rid of one thing.
>>>
>>>  - Craig
>>>
>>>
>>>
>>> > [root@testboard: /root#
>>> >
>>> > So, we take our patches out and recompile and install, and it works
>>> again but still has the 255 custom oid limitation.
>>> >
>>> > A snippet from our header file. Too big to paste it all.
>>> >
>>> > #define TEMPC 1
>>> > #define TEMPF 2
>>> > #define   UPTIME_STR 3
>>> > #define   SERIALNUMBER 4
>>> > #define   ALLOFIT 5
>>> > #define   ROOTFSBUILD 6
>>> > #define   KERNELBUILD      7
>>> > #define   OSINFO    8
>>> > ......
>>> > #define PRODUCT_ID 250
>>> > #define RUNSCRIPT 251
>>> > #define TIMER1 252
>>> > #define TIMER2 253
>>> > #define TIMER3 254
>>> > #define TIMER4 255
>>> > #define TIMER5 256 <- This outpts an error because it wraps around and
>>> 0 is not defined.
>>> > #define TIMER6 257 <- This outputs TEMPC value instead of TIMER6.
>>> > #define TIMER7 258
>>> > #define TIMER8 259
>>> > #define TIMER9 260
>>> > #define TIMER10 261
>>> >
>>> > #define    EXAMPLETIMETICKS 3333
>>> > #define EXAMPLEIPADDRESS        4444
>>> > #define   EXAMPLECOUNTER 7777
>>> > #define EXAMPLEGAUGE            8888
>>> > #define EXAMPLETRIGGERTRAP      9999
>>> > #define EXAMPLETRIGGERTRAP2     1000
>>> >
>>> > Notice the example defines above that were provided in the example C
>>> header file, those magic numbers would have never worked because of the
>>> u_char (8-bit) magic variable limitation.
>>> >
>>> > This is a code snippet from our custom mib C file.
>>> >
>>> > struct variable4 testboard_variables[] = {
>>> >    {ROOTFSBUILD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var,
>>> 2, {7, 1}},
>>> >    {KERNELBUILD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var,
>>> 2, {7, 2}},
>>> >    {OSINFO, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var, 2, {7,
>>> 3}},
>>> >    {PRODUCT_ID, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, etestboard_var,
>>> 2, {7, 4}},
>>> >    {UPTIME_STR, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var, 2,
>>> {5, 1}},
>>> >    {SERIALNUMBER, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var,
>>> 2, {5, 2}},
>>> >    {TEMPC, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var, 2,
>>> {6,1}},
>>> >    {TEMPF, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_var, 2,
>>> {6,2}},
>>> >
>>> > We have poured over the souce code looking for any other instance of
>>> u_char magic that we may have missed, but they are only defined in the two
>>> files mentioned above.
>>> >
>>> > We need some help with this. What else do we need to do in the 5.9
>>> versions to make the magic number not wrap around to zero after 255 and not
>>> crash when we do that?
>>> >
>>> > Thanks,
>>> >
>>> > Neeraj Bansal
>>> > _______________________________________________
>>> > Net-snmp-coders mailing list
>>> > [email protected]
>>> > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
>>>
>>

--0000000000002ba906062d06c254
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Thank you for the suggestions. Based on your suggesti=
on, we were trying different things and figured out a way to make it work.=
=C2=A0</div><div><br></div><div>One of the first things we did was, remove =
all the warnings since there were a lot. Then we saw that the compiler was =
telling us that there are more than 255 variables=C2=A0which is more than t=
he vp-&gt;magic variable can store.</div><div><br></div><div>One of the oth=
er thing we tested was, if we can see all the OIDs with &quot;name&quot; va=
riable with the following code:</div><div><br></div><div><div style=3D"colo=
r:rgb(211,175,134);background-color:rgb(34,26,15);font-family:Consolas,&quo=
t;Courier New&quot;,monospace;font-size:14px;line-height:19px"><div><span s=
tyle=3D"color:rgb(165,122,76)">    // Find the OID to match</span></div><di=
v>=C2=A0 =C2=A0 <span style=3D"color:rgb(138,177,176)">memset</span>(tmpsql=
,<span style=3D"color:rgb(247,154,50)">0</span>, sizeof(tmpsql));</div><div=
>=C2=A0 =C2=A0 <span style=3D"color:rgb(138,177,176)">memset</span>(buf,<sp=
an style=3D"color:rgb(247,154,50)">0</span>, sizeof(buf));</div><div>=C2=A0=
 =C2=A0 <span style=3D"color:rgb(152,103,106)">for</span> (z =3D <span styl=
e=3D"color:rgb(247,154,50)">0</span>; z &lt; *length; z++)</div><div>=C2=A0=
 =C2=A0 {</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 res =3D <span style=3D"colo=
r:rgb(138,177,176)">snprintf</span>(buf, sizeof(buf), &quot;<span style=3D"=
color:rgb(247,154,50)">%u</span>&quot;,<span style=3D"color:rgb(220,57,88)"=
>name</span>[z]);</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <span style=3D"colo=
r:rgb(138,177,176)">strcat</span>(tmpsql, buf);</div><div>=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 <span style=3D"color:rgb(152,103,106)">if</span>(z &lt; *length =
- <span style=3D"color:rgb(247,154,50)">1</span>)</div><div>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 {</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <span s=
tyle=3D"color:rgb(138,177,176)">strcat</span>(tmpsql, &quot;<span style=3D"=
color:rgb(136,155,74)">.</span>&quot;);</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=
=A0 }</div><div>=C2=A0 =C2=A0 }</div><div><br></div><div>

<div style=3D"line-height:19px"><div><span style=3D"color:rgb(165,122,76)">=
    // tmpsql contains the OID, match it in a switch case </span></div><div=
>=C2=A0 =C2=A0 <span style=3D"color:rgb(152,103,106)">for</span> (<span sty=
le=3D"color:rgb(152,103,106)">size_t</span> i =3D <span style=3D"color:rgb(=
247,154,50)">0</span>; i &lt; NUM_ENTRIES; i++) </div><div>=C2=A0 =C2=A0 {<=
/div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 <span style=3D"color:rgb(152,103,106)=
">if</span> (<span style=3D"color:rgb(138,177,176)">strcmp</span>(<span sty=
le=3D"color:rgb(220,57,88)">oidlookupTable</span>[i].<span style=3D"color:r=
gb(220,57,88)">oid</span>, tmpsql) =3D=3D <span style=3D"color:rgb(247,154,=
50)">0</span>) </div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 {</div><div>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 matched_code =3D <span style=3D"color:rg=
b(220,57,88)">oidlookupTable</span>[i].<span style=3D"color:rgb(220,57,88)"=
>device_type</span>;</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 <s=
pan style=3D"color:rgb(152,103,106)">break</span>;</div><div>=C2=A0 =C2=A0 =
=C2=A0 =C2=A0 }</div><div>=C2=A0 =C2=A0 }</div></div>

</div></div></div><div><br></div><div>And we thought, we can use the OIDs t=
o match up all the data points and that&#39;s what we used in the switch st=
atement. We added a struct as follows and defined all our variables, which =
uses the previously defined variables in header file.</div><div><br></div><=
div><div style=3D"color:rgb(211,175,134);background-color:rgb(34,26,15);fon=
t-family:Consolas,&quot;Courier New&quot;,monospace;font-size:14px;line-hei=
ght:19px"><div><span style=3D"color:rgb(152,103,106)">typedef</span> <span =
style=3D"color:rgb(152,103,106)">struct</span> OidEntry {</div><div>=C2=A0 =
=C2=A0 <span style=3D"color:rgb(152,103,106)">const</span> <span style=3D"c=
olor:rgb(152,103,106)">char</span> *oid;</div><div>=C2=A0 =C2=A0 <span styl=
e=3D"color:rgb(152,103,106)">int</span> device_type;</div><div>} OidEntry;<=
/div></div></div><div><br></div><div>This solution seems to work for us and=
 now we can add as many variables as we want. I hope this solution can help=
 someone else as well.=C2=A0</div><div><br></div><div>And again, thank you =
for your response Craig.</div><font color=3D"#888888"><div><br></div><div>-=
 Neeraj</div></font></div><br><div class=3D"gmail_quote gmail_quote_contain=
er"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, 11 Oct 2024 at 00:16, Cra=
ig Small &lt;<a href=3D"mailto:[email protected]">[email protected]</a>=
&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px =
0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div=
 dir=3D"ltr"><div>Hi,</div><div>=C2=A0 You can definitely have more than 25=
5 custom OIDs, the trick is you only have 255 values for magic. I&#39;m sur=
prised hacking the magic value didn&#39;t crash it before.</div><div><br></=
div><div>There&#39;s probably a few options; the good, the bad and the ugly=
.</div><div><br></div><div>Good</div><div>Rebuild the MIB and functions so =
each type of variable uses a different accessor function, so testboard_var =
becomes testboard_load, testboard_temperature etc.</div><div>As long as you=
 don&#39;t have 256 temperature sensors or load sensors or same things this=
 works. If you have different ways of getting values, it also means the</di=
v><div>functions are simpler/smaller because the temperature getter has no =
code for working out system load and vice-versa. It also means you&#39;re n=
ot bothering to fetch the</div><div>temperature when you want to get the lo=
ad too.<br></div><div><br></div><div>Bad</div><div>Keep the mib as it is, b=
ut have several accessor functions which have a different magic which you a=
dd to the parameters passed to the real accessor.</div><div>Your testboard_=
var() will need a new parameter, say mymagic which is something larger than=
 u_char</div><div><br></div><div>testboard_var1(vp, other variables)</div><=
div>=C2=A0 return (testboard_var(vp-&gt;magic, vp, other variables)</div><d=
iv></div><div>testboard_var2(vp, other_variables)</div><div>=C2=A0 return (=
testboard_var(vp-&gt;magic+256, vp, other_variables)</div><div><div>testboa=
rd_var3(vp, other_variables)</div><div>=C2=A0 return (testboard_var(vp-&gt;=
magic+512, vp, other_variables)</div><div>In your variables array the ones =
that use 1-255 use testboard_var1, 256-511 use testboard_var2 (but use magi=
c-256) etc.<br></div></div><div><br></div><div></div><div></div><div>Ugly</=
div><div>Overload or ignore the magic and match on the OID directly, which =
is called vp-&gt;name. There&#39;s a reason why this is the ugly option.<br=
></div><div><br></div><div>=C2=A0- Craig</div><div><br></div></div><br><div=
 class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, 21 Sep=
t 2024 at 05:24, Neeraj Bansal &lt;<a href=3D"mailto:neerajbansal54321@gmai=
l.com" target=3D"_blank">[email protected]</a>&gt; wrote:<br></di=
v><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;borde=
r-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr">That m=
akes sense=C2=A0Craig. Thank you for your input.<div><br></div><div>To summ=
arize the issue, we are unable to use more than 255 OID entries and would l=
ove to get any help on this issue.=C2=A0</div><div><br></div><div>Is there =
another way to use=C2=A0more than 255 custom=C2=A0OID&#39;s?</div><div><br>=
</div><div>Thank You to anyone looking into this matter.</div><div><br></di=
v><div>- Neeraj</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" =
class=3D"gmail_attr">On Mon, 29 Jul 2024 at 14:26, Craig Small &lt;<a href=
=3D"mailto:[email protected]" target=3D"_blank">[email protected]</a>&g=
t; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0p=
x 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri=
, 12 Jul 2024 at 08:31, Neeraj Bansal &lt;<a href=3D"mailto:neerajbansal543=
[email protected]" target=3D"_blank">[email protected]</a>&gt; wrote:<=
br>
&gt; We recompile everything and install no problem, but instead of fixing =
our problem it caused net-snmp-5.9.3 to not be able to start. The error it =
gives is: Bad user id, which could be a red herring. example below:<br>
&gt; [root@testboard: /root# /etc/init.d/S59netsnmp restart<br>
&gt; Stopping SNMP daemon: [OK]<br>
&gt; Starting SNMP daemon: Bad user id: snmp<br>
I think it is a red herring, that error is from the -u option.<br>
<br>
# /usr/sbin/snmpd -u blah<br>
Bad user id: blah<br>
<br>
I know that is not solving your main issue, but its got rid of one thing.<b=
r>
<br>
=C2=A0- Craig<br>
<br>
<br>
<br>
&gt; [root@testboard: /root#<br>
&gt;<br>
&gt; So, we take our patches out and recompile and install, and it works ag=
ain but still has the 255 custom oid limitation.<br>
&gt;<br>
&gt; A snippet from our header file. Too big to paste it all.<br>
&gt;<br>
&gt; #define=E2=80=83 TEMPC=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=
=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=
=83=E2=80=83=E2=80=831<br>
&gt; #define=E2=80=83 TEMPF=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=
=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=
=83=E2=80=83=E2=80=832<br>
&gt; #define=C2=A0 =C2=A0UPTIME_STR=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=
=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=
=833<br>
&gt; #define=C2=A0 =C2=A0SERIALNUMBER=E2=80=83=E2=80=83=E2=80=83=E2=80=83=
=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=834<b=
r>
&gt; #define=C2=A0 =C2=A0ALLOFIT=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=
=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=
=E2=80=83=E2=80=835<br>
&gt; #define=C2=A0 =C2=A0ROOTFSBUILD=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=
=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83 6<br>
&gt; #define=C2=A0 =C2=A0KERNELBUILD=C2=A0 =C2=A0 =C2=A0 7<br>
&gt; #define=C2=A0 =C2=A0OSINFO=E2=80=83=E2=80=83=E2=80=83=E2=80=83=E2=80=
=83=E2=80=83=E2=80=83=E2=80=83=E2=80=83=C2=A0 =C2=A08<br>
&gt; ......<br>
&gt; #define PRODUCT_ID 250<br>
&gt; #define RUNSCRIPT 251<br>
&gt; #define TIMER1 252<br>
&gt; #define TIMER2 253<br>
&gt; #define TIMER3 254<br>
&gt; #define TIMER4 255<br>
&gt; #define TIMER5 256 &lt;- This outpts an error because it wraps around =
and 0 is not defined.<br>
&gt; #define TIMER6 257 &lt;- This outputs TEMPC value instead of TIMER6.<b=
r>
&gt; #define TIMER7 258<br>
&gt; #define TIMER8 259<br>
&gt; #define TIMER9 260<br>
&gt; #define TIMER10 261<br>
&gt;<br>
&gt; #define=C2=A0 =C2=A0 EXAMPLETIMETICKS=E2=80=83=E2=80=83=E2=80=83=E2=80=
=833333<br>
&gt; #define=E2=80=83=E2=80=83EXAMPLEIPADDRESS=C2=A0 =C2=A0 =C2=A0 =C2=A0 4=
444<br>
&gt; #define=C2=A0 =C2=A0EXAMPLECOUNTER=E2=80=83=E2=80=83=E2=80=83=E2=80=83=
=E2=80=83=E2=80=837777<br>
&gt; #define=E2=80=83=E2=80=83EXAMPLEGAUGE=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=
=A0 =C2=A0 8888<br>
&gt; #define=E2=80=83=E2=80=83EXAMPLETRIGGERTRAP=C2=A0 =C2=A0 =C2=A0 9999<b=
r>
&gt; #define=E2=80=83=E2=80=83EXAMPLETRIGGERTRAP2=C2=A0 =C2=A0 =C2=A01000<b=
r>
&gt;<br>
&gt; Notice the example defines above that were provided in the example C h=
eader file, those magic numbers would have never worked because of the u_ch=
ar (8-bit) magic variable limitation.<br>
&gt;<br>
&gt; This is a code snippet from our custom mib C file.<br>
&gt;<br>
&gt; struct variable4 testboard_variables[] =3D {<br>
&gt;=C2=A0 =C2=A0 {ROOTFSBUILD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testbo=
ard_var, 2, {7, 1}},<br>
&gt;=C2=A0 =C2=A0 {KERNELBUILD, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testbo=
ard_var, 2, {7, 2}},<br>
&gt;=C2=A0 =C2=A0 {OSINFO, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_v=
ar, 2, {7, 3}},<br>
&gt;=C2=A0 =C2=A0 {PRODUCT_ID, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, etestbo=
ard_var, 2, {7, 4}},<br>
&gt;=C2=A0 =C2=A0 {UPTIME_STR, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboa=
rd_var, 2, {5, 1}},<br>
&gt;=C2=A0 =C2=A0 {SERIALNUMBER, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testb=
oard_var, 2, {5, 2}},<br>
&gt;=C2=A0 =C2=A0 {TEMPC, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_va=
r, 2, {6,1}},<br>
&gt;=C2=A0 =C2=A0 {TEMPF, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, testboard_va=
r, 2, {6,2}},<br>
&gt;<br>
&gt; We have poured over the souce code looking for any other instance of u=
_char magic that we may have missed, but they are only defined in the two f=
iles mentioned above.<br>
&gt;<br>
&gt; We need some help with this. What else do we need to do in the 5.9 ver=
sions to make the magic number not wrap around to zero after 255 and not cr=
ash when we do that?<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Neeraj Bansal<br>
&gt; _______________________________________________<br>
&gt; Net-snmp-coders mailing list<br>
&gt; <a href=3D"mailto:[email protected]" target=3D"_bl=
ank">[email protected]</a><br>
&gt; <a href=3D"https://lists.sourceforge.net/lists/listinfo/net-snmp-coder=
s" rel=3D"noreferrer" target=3D"_blank">https://lists.sourceforge.net/lists=
/listinfo/net-snmp-coders</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>

--0000000000002ba906062d06c254--


--===============0764190094970265178==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============0764190094970265178==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

--===============0764190094970265178==--