>>>>> On Mon, 5 Dec 2005 18:37:12 +0100, "Anders Broman" <a.broman@xxxxxxxxx> said:
Anders> I have checked in code to translate OID names from SNMP MIB:s
Anders> if not found in the OID names data base (Should that code be
Anders> included in oid_to_str() instead?).
Anders> This also raises the question on how to handle MIB:s.
Anders> Currently we include the ones from the SNMP library. How
Anders> should we add other MIB:s to the distribution if we want to?
Anders> Another option is to have a separate downloadable set of
Anders> MIB:s.
Currently ethereal uses the net-snmp toolkit to load MIBs. Users can
put lines like the following into their snmp.conf file to control what
mibs are loaded:
mibs +MY-SUPER-MIB
or if all of them were desired to be loaded:
mibs ALL
If ethereal wanted to keep using net-snmp to parse MIBs, it could call
init_snmp("ethereal") and then the library would look for a
ethereal.conf file which ethereal could install... In that file you
could build specific MIBs to be included beyond those that the user
configured net-snmp to load by putting lines like the following in the
ethereal.conf file:
[snmp] mibs +MY-SUPER-MIB
Or... If ethereal is not calling init_snmp() it could just set the
MIBS environment variable to whatever it wanted too (or the MIBDIRS
variable as well to add MIB files).
Note that Net-SNMP a long time ago loaded all MIBs it could find by
default. User's hated this because it was too slow and prone to
parsing files it didn't need (and were potentially broken MIBs that
spit lots of warnings), thus
Anders> Should we have our own "MIB" with translations we want? Should
Anders> that replace the "names data base"? We could read that file if
Anders> the SNMP library isn't available.
Net-SNMP's parser is BSD licensed... you could copy it into the
ethereal code (though tracking changes could be problematic0. I
wouldn't suggest writing your own parser as it's a non trivial task
that would take a lot of new code...
--
Wes Hardaker
Sparta, Inc.