"value_ok" method for BITS type
Frank.Fock____t-online.de
Frank.Fock____t-online.de
Wed Apr 9 17:32:46 CEST 2003
Again, please use the latest version. This has been
fixed in v2.0.2a. The current version is v2.0.4.
Frank
l.borelli____cpr.it schrieb:
> Another problem:
>
> I'm trying to use a BITS type MIB object (with 3 values),
> as defined below,
>
>
> ----------------------------------------
> tcTransparencyBits OBJECT-TYPE
> SYNTAX BITS { pathVc (1), lineMs(2), sectionRs(3)
> }
> MAX-ACCESS read-create
> STATUS current
> DESCRIPTION
> "xxx"
> REFERENCE
> "xxx"
> DEFVAL { {pathVc} }
> ::= { tcEntry 37 }
> ----------------------------------------
>
>
> The generated code for "value_ok" method appears as
> below,
>
>
> ----------------------------------------
>
> OctetStr v;
> vb.get_value(v);
> if (( !(v[1%8] & (1<<(7-(1%8)))))
> && (!(v[2%8] & (1<<(7-(2%8)))))
> && (!(v[3%8] & (1<<(7-(3%8)))))) return FALSE;
> return TRUE;
>
> ----------------------------------------
>
> This results in a bad check during execution. Perhaps the
> '%' into v[x%8] should be replaced by a '/'.
>
>
> Thanks in advance
>
> Leonardo
>
>
>
>
>
>
More information about the AGENTPP
mailing list