On Sat, 2010-02-13 at 20:41 -0500, Ralph Blach wrote:
> I have read the documentation,
>
> I need an example to and oid's with like 3.1.7.7.xxx.xxx.xxx
> to the linux snmpd services. Of course the oids will not start with
> 3.1.7.7 but the examples are less than clear.
>
> Any hints from the coders.
I am not entierly certain about what you wish to do but
const oid your_oid[] = { <your organization>, 3, 1, 7, 7, xxx, xxx, xxx,
xxx };
void init_your_module()
{
netsnmp_register_scalar(
netsnmp_create_handler_registration("your_module",
your_handler_function, your_oid, OID_LENGTH(your_oid),
HANDLER_CAN_RONLY)));
}
registers an oid.
You can not register the oid 3.1.7.7... for technical reasons, the first
and second digit are compressed so that the valid starts are
0.[0-79], 1.[0-79] and 2.[0-(2**32 - 161)]
This shouldn't concern you as all snmp oids are placed under .1.3.6.1
anyhow.
/MF
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders