I am developing an SNMP-enabled application using the NET-SNMP libraries
and have encountered a number of problems regarding support for "standard"
ASN.1 types.

Specifically, I wish to use BOOLEAN and REAL values for representing data
generated within my application (Agent-side). I believe these to be
standard types as discussed in:

      http://www.itu.int/ITU-T/studygroups/com17/languages/X.680-0207.pdf

Specifically, the net-snmp libraries allow me to generate code that sets
the value of a MIB attribute using any of the types that are defined in the
asn1_defs.h header file, and yet some of these apparently supported types
are not actually fully supported when parsing a MIB, i.e. ASN_BOOLEAN,
ASN_FLOAT and ASN_DOUBLE (please, please, please, do not tell me about
using the net-snmp special Opaque types!!!)

I wish/need to generate both agent and client side code and, using the perl
scripts and configuration files as a template (as is suggested in the
accompanying documentation) wish to perform some type-checking for sets and
get-responses on each side. Consequently I wish to set the type of the
variable within the agent code (as ASN_FLOAT, for example) and have the
auto-generated client-side code perform a type check of $i.type (where I
use @foreach $i scalar@ against the type in the netsnmp-variable
definition.

How can I acheive this?

I have been playing around with some of the debug settings etc. in the perl
script (for the SNMP.pm module) and it appears that the source code in
parse.c (used to build the snmp.dll loaded and used by the perl script)
does not recognise FLOAT, DOUBLE or REAL as valid ASN1 types (even though
REAL is supported, and FLOAT and DOUBLE are defined in the ASN1 definitions
header file).

Any comments?

Martin Cooke



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to