question: how to register other types?
Mostafa Salari <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <CAGQ+h=1_vU4Z8qSDma2_rJkTyeaddie0NkfUVgTDKWbfbO1kJA@mail.gmail.com> |
In a subagent, I can register (for example) Counter32 MIBs with the
following function:
netsnmp_register_read_only_counter32_instance(...)
So, how can I register (for example) STRING or TimeTick MIBs.
I did'nt find a suitable function here:
http://www.net-snmp.org/docs/man/netsnmp_instance.html#lbAG
EXAMPLE: consider,
myoid[] = {1,3,6,1,2,1,11,28,0}; // .1.3.6.1.2.1.11.28.0 is a Count32
MIB
int x = 123;
Now, if you register myoid by the following function:
netsnmp_register_*long*_instance("a_name", myoid, OIDLENGHT(myoid),
&x);
then snmpget of that MIB (or snmpwalk) responds that: Wrong Type (Must be:
Counter32), INTEGER : 123
so you must know that myoid must be registered by:
netsnmp_register_*read_only_**counter32*_instance("a_name", myoid,
OIDLENGHT(myoid), &x);
thanks a lot
Mustafa
------------------------------------------------------------------------------
_______________________________________________
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