On Sun, 2010-02-14 at 10:34 -0500, Ralph Blach wrote:
> 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.

The company has their base mib assigned, good, that means they are the
administrative owners of everything below that OID and so they can just
assign new OID's below their root, there are no code changes needed for
that, they just have to change their documentation. (The OID space is an
idea, the MIB files describe this idea and the agent implement parts of
it, you can then add more parts of the OID space to the agent, this is
known as extending the agent)

> 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.

Like I showed you, just replace netsnmp_register_scalar with
netsnmp_register_handler - your_handler_function will then be called
whenever there is a request for anything below that registration point
but this means that you are rejecting most of our helpful classes,
nothing wrong with that but make sure you aren't reinventing the wheel
on client time.

> 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.

Well, you are basically asking how to subvert the published interfaces,
go into the internal structures and meddle about so that a registration
of A.1 also handles A.2, is that correct?
I am not certain that it is possible to do so due to the data structures
we are using. It was assumed that a handler for A.1 did'n care about
requests for A.2 and so they are not shown to it.

Why is it not acceptable to add a new specialized handler for the new
command? Or are you extending an old set of commands? If that is the
case then you have to add the new case to the handler function for that
interface and possibly adjust the registration of the old identifier so
that your new OID is covered by the registration.



Or was the question you tried to ask how to register a variable without
an accompanying change to a MIB file?

Then I will tell you something - the agent do not need the mib files,
they only add nicer logs and more human readable configuration files.

>From that it obviously follows that the registrations in the code is all
that the agent care about.

The problem with that is that you have no way to communicate the meaning
of the added variables to the users of the interface, for them it will
either be presented with just it's basic types or not presented at all.
I have seen both behaviours in management stations.

/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

Reply via email to