Re: How to register a octect stream?
Alon Marx <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Organization | iportent |
| Message-ID | <[email protected]> |
Dave,
I'm using mib2c to generate code. I started writing and ask why there's
no mib2c-configuration file that generates code using the functions you
pointed out, when I saw that version 5.3 has the int_watch :) Like many
other times someone already thought of my ideas.. It's really great.
By the way, is there another configuration file that handles strings
(ASN_OCTET_STR)?
Also, an idea 'stolen' from rpcgen:
nowadays, the scalar configuration file generates the main part of the
code (oid registration, etc.) and generates remarks where the user has
to insert his code:
snmp_set_var_typed_value(requests->requestvb, ASN_OCTET_STR,
(u_char *)/* XXX: a pointer to the scalar's data */,
/* XXX: the length of the data in bytes */ );
Would it be better to just declare a function that will return the
pointer and length. This will enable the user to put his code within the
file (as it works today), or to implement the function in another file.
That way the mib2c-update will not be needed anymore, simplifying the
build process.
If the idea seems reasonable, I guess it would be relevant to other
configuration files as well.
Alon
On Thu, 2006-07-13 at 14:59 +0100, Dave Shield wrote:
> On 13/07/06, Alon Marx <[email protected]> wrote:
> netsnmp_register_scalar
>
> That will register a scalar object, true.
> But you still need to provide a handler to provide the actual value.
>
> Both 'ns_register_int_instance' and 'ns_register_watched_scalar'
> use a standard internal handler. The MIB module coder just has
> to indicate the appropriate variable, and the helper library does the
> rest.
>
> Dave
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users