>>>>> On Tue, 1 Sep 2009 08:48:20 +0100, Dave Shield
>>>>> <[email protected]> said:
DS> But that doesn't automatically make them public API calls, IMO.
Ok, understood.
DS> I would suggest that the public API for translating an object name
DS> into a numeric OID is "read_objid()".
Sure, if that's all they wanted. I may even give you that get_node
could be marked as internal if we were going to start from scratch. But
telling people suddenly a gazzilion years that the functions used in the
example apps/ directory (which is routinely where we tell people to look
when they want to write management and mib related code) seems unwise.
You may not want it to be public, but I'd argue it is at this point.
DS> If nothing else, it doesn't even exist if MIB loading has been
DS> disabled!
read_objid is fairly useless even if it exists.
DS> As far as 'get_tree' is concerned, I'm not sure whether we need to
DS> provide a public API for access to the internal MIB structure.
DS> Fiddling with this sort of low-level MIB detail is not a core part
DS> of most SNMP requirements.
In order to write a generic, but intelligent, manager you need to know a
lot about the data in the mib tree. IMHO, it's critical to offer
support for that sort of thing.
DS> Even if we do need to provide such an API, then I don't think
DS> get_tree() is the right answer.
Room for improvement certainly exists everywhere ;-)
DS> But I suspect the underlying issue may be what we each understand
DS> by "public API" vs "internal API".
True. I think that isn't a big enough set of things to lump things
into. At a minimum I think we need:
- advertised API (read_objid should fall into this)
- exported API (get_tree *does* fall into this, even if we no longer
wanted it to; it's been in example code since CMU)
- private APIs (historically we've had too few of these, I agree.
But at the same time I strongly disagree with the
notion that almost everything should go here. If
functionality isn't publicly exported then people
*will* try and use the private APIs because that's
the only way they can get at a feature they need)
--
Wes Hardaker
Please mail all replies to [email protected]
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders