package netsnmp
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ebb8a7aa4af5fdc5cc8d9d0f0640041154ea766037d9c32562705ebbbd331774
doc/netsnmp.raw/Netsnmp_raw/Mib/index.html
Module Netsnmp_raw.Mib
Source
Netsnmp_mib provides the low level interface to net-snmp's MIB and ASN.1 handling functions. See the the add_mibdir(3) man page unless otherwise noted
netsnmp_init_mib
initialises the net-snmp mib library and must be called before most MIB functions, see per function documentation for exceptions. More information can be found in the net-snmp manual page: init_mib(3)
shutdown_mib
cleans up and free memory assocated with the net-snmp mib library. Don't call any MIB functions afterwards. See shutdown_mib(3) for more details.
add_mibdir
adds a directory to the list of directories to search when loading MIB modules. This must be called after netsnmp_init_mib
even though the man page says the opposite. Raises Netsnmp_exceptions.Not_found
if the directory is missing. See add_mibdir(3) for more details
read_objid
raises an Netsnmp_exceptions.Not_found
exception on failure. See read_objid(3) for more details
get_node
raises an Netsnmp_exceptions.Not_found
exception on failure. See get_module_node(3) for more details
objid_of_int_array
builds an OID from an OCaml array of integers.
objid_to_int_array
returns the integer values of an OID as an array.
get_module_node
raises an Netsnmp_exceptions.Not_found
exception on failure See get_module_node(3) for more details
The netsnmp netsnmp_read_module
and read_mib functions do not provide reliable error reporting, sigh. See netsnmp_read_module(3), read_mib(3) and read_all_mibs(3) for more details
snmp_set_mib_errors
and snmp_set_mib_warnings
set the error and warning level. Note that the netsnmp libraries have a bad habit of outputing errors even when these are set to 0. See snmp_set_mib_errors(3) and snmp_set_mib_warnings(3) for more details
print_mib
takes a file descriptor unlike the C API, flush any output before calling these functions to avoid output ordering issues. See print_mib(3) for more details
fprint_objid
takes a file descriptor unlike the C API. See fprint_objid(3) for more details
snprint_objid
converts a Oid.t to the textual representation. See snprint_objid(3) for more details
snmp_set_save_descriptions
causes the descriptions in the MIB modules to be loaded as well. This must be called before netsnmp_init_mib
. This function influences the output of the print functions as well as the snprint_* ones. See snmp_set_save_descriptions(3) for more details
add_module_replacement
. See add_module_replacement(3) for more details