net-snmp/agent/mibgroup
Faye eeb5f10e6c repair CVE-2022-24805 CVE-2022-24806 CVE-2022-24807 CVE-2022-24808 CVE-2022-24809 CVE-2022-24810 2023-03-03 19:43:37 +08:00
..
Rmon Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
agent repair CVE-2022-24805 CVE-2022-24806 CVE-2022-24807 CVE-2022-24808 CVE-2022-24809 CVE-2022-24810 2023-03-03 19:43:37 +08:00
agentx Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
deliver Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
disman Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
etherlike-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
examples Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
hardware autofs-skip-autofs-entries 2022-06-27 15:01:27 +08:00
host HOST-MIB, hr_filesys: Fix Check_HR_FileSys_AutoFs() 2022-06-27 15:01:27 +08:00
if-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ip-forward-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ip-mib MIB-II: Only log once that opening /proc/net/if_inet6 failed 2022-06-27 15:01:27 +08:00
ipfwchains Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
mibII repair CVE-2022-24805 CVE-2022-24806 CVE-2022-24807 CVE-2022-24808 CVE-2022-24809 CVE-2022-24810 2023-03-03 19:43:37 +08:00
misc Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
notification Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
notification-log-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
rmon-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
sctp-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
smux Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmp-notification-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmp-usm-dh-objects-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmpv3 repair CVE-2022-24805 CVE-2022-24806 CVE-2022-24807 CVE-2022-24808 CVE-2022-24809 CVE-2022-24810 2023-03-03 19:43:37 +08:00
target Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tcp-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tlstm-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tsm-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tunnel Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ucd-snmp _libsensors_api 2022-06-27 15:01:26 +08:00
udp-mib Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
util_funcs Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
utilities Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
Makefile.depend Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
Makefile.in Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
README Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
README.smux Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
Rmon.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
agent_mibs.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
agentx.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
default_modules.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
disman.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
etherlike-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
examples.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
header_complex.c Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
header_complex.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
host.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
host_res.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
if-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ip-forward-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ip-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
kernel_sunos5.c Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
kernel_sunos5.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
mibII.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
mibdefs.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
mibincl.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
notification-log-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
notification.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
rmon-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
sctp-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
smux.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
smux_gated.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmp-notification-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmp-usm-dh-objects-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
snmpv3mibs.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
struct.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
target.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tcp-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
testhandler.c Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
testhandler.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tlstm-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tsm-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
tunnel.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
ucd_snmp.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
udp-mib.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
util_funcs.c Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
util_funcs.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
utilities.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
winExtDLL.c Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00
winExtDLL.h Import Upstream version 5.8+dfsg 2022-06-27 15:01:12 +08:00

README

This directory holds the implementation of individual MIB groups.
Currently, this contains the eight MIB-2 groups, plus a basic template
for new MIB groups (examples/example.c and examples/example.h)

Additionally, you may wish to check out the 'mib2c' perl script in the 
SRCDIR/local directory that can convert a written mib into C template
files for use with this package as mib modules.

Each group consists of two files:

  examples/example.h:	interface information

	- declaration of the initialisation function 'init_example'
		(optional)
	- declaration of the function(s) for retrieving variable
		information 'var_example'
	- declaration of the function(s) for setting variable
		information (if appropriate)

	- declaration of the function(s) for parsing the snmpd.conf file
		(optional)
        - a call to config_parse_dot_conf() to explain to the .conf
		parser which tokens we want to parse.
		(optional)

	- definitions of the MIB group 'magic numbers'
		declarations of the 'public' functions

	- a list of the variables in the group, including
		type information, mapping between magic numbers
		and OID sub-identifiers within the group,
		accessibility information, and the relevant
		function for retrieving this variable's value.
                They *must* be listed in the mib-descending order.
	- a call to 'config_load_mib', identifying the location of
		this MIB group within the general MIB structure.
	- a call to 'config_require' to identify any other files
		that are required by the implementation of this group.
		(optional)

    (these last three are only visible within the 'glue' file 'snmp_vars.c'
	(if at all), but are declared here for ease of maintainance)



  examples/example.c:	implementation code
		(can be non-existant if only the .h file is needed)

	- a list of kernel information needed to report
		on this group
	- an initialisation function (optional)
        - a routine to parse an snmpd.conf line.
        - a routine to free resources from above and return to 
                default settings.
	- 'header' function(s) to map the OID requested
		to the next appropriate OID
		(and similar system-independent setup)
	- function(s) (possibly system-specific) to
		determine and return the value of the
		variable requested.
	- (optionally) functions used to set values
	- other functions used internally


To implement a new MIB group, copy the two files 'example.c'
and 'example.h' to appropriate new files ({MODULENAME}.c and {MODULENAME}.h),
and edit them as follows:

	example.h:
		globally change "example" to the new module name
		    and update the initial comment.
		replace the EXAMPLE* defines with the list of
		    variables within this new group
		fill in the 'MODULENAME_variables' structure with these
		    new variables, updating the type, accessibility
		    and sub-identifier information as appropriate.
		replace 'variableN' with the maximum size of the
		    returned OID (omitting the group prefix).
		    For non-table values, this will probably be one
		    greater than the length of the sub-identifier.
                update or remove the 'config_parse_dot_conf' call if
                    you need to handle lines in the snmpd.conf files.
		update the 'config_load_mib' call with the appropriate
		    location within the global MIB structure, and
		    its length (note that 'MIB' has length 6)
		provide a suitable 'config_require' call if this
		    code uses routines from any other files within
		    the 'mibgroup' directory (such as 'util_funcs.c')



	example.c:
		globally change "example" to the new module name
		    and update the initial comment.
		replace the 'MODULENAME_nl' name list with any necessary
		    kernel variables, and update the associated #define's
		replace the name length definition within the 'header'
		    function with the length of the requesting OID
		    (i.e. the sum of the lengths given in the subtree
		     definition, and the variable structure above).
		replace the basic 'switch' structure within the
		    'var_MODULENAME' function with the necessary code
		    to calculate the required information.
		(plus any other internal functions as needed).

  It will then be necessary to (re-)run the configure script with the
option
	--with-mib-modules="MODULENAME"

(where MODULENAME matches the name of the .c/.h file pair exactly).
Note that if anything in the config_* macros changes, or the init function
is added or removed, then the configure script will need to be re-run.