Mangus,

I just want to add OID with out going through the mib process,
The company which ask me already has there base mib's assigned.

I just need to know how to register and and process a extra commands
for a base oid's under what ever oid this company is using.

const oid your_oid[] = {<your organization>, 1, 3, 6, 1, 555, 1, 1,1 }; 
         //only an example!!!!!!!  how do I add, in this handler 
1.3.6.1.555.1.1.2  1.3.6.1.555.1.1.3
        //in this handler.  this is not clear in the documentation and examples.
Thanks

Chip

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)));
}



Magnus Fromreide wrote:
> 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
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to