• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

Rmon/H14-Aug-2020-5,5344,080

agent/H14-Aug-2020-4,1353,013

agentx/H14-Aug-2020-5,3453,966

deliver/H14-Aug-2020-517377

disman/H14-Aug-2020-44,57329,833

etherlike-mib/H14-Aug-2020-5,1312,231

examples/H14-Aug-2020-3,6051,862

hardware/H14-Aug-2020-6,2234,482

host/H14-Aug-2020-14,20210,639

if-mib/H14-Aug-2020-16,7578,288

ip-forward-mib/H14-Aug-2020-15,9056,676

ip-mib/H14-Aug-2020-47,56221,246

ipfwchains/H14-Aug-2020-54

mibII/H14-Aug-2020-27,78021,958

misc/H14-Aug-2020-421301

notification/H14-Aug-2020-2,7611,774

notification-log-mib/H14-Aug-2020-792524

rmon-mib/H14-Aug-2020-7,0663,105

sctp-mib/H14-Aug-2020-5,6404,166

smux/H14-Aug-2020-3,3032,473

snmp-notification-mib/H14-Aug-2020-6,7762,646

snmp-usm-dh-objects-mib/H14-Aug-2020-5,2182,219

snmpv3/H14-Aug-2020-2,1671,494

target/H14-Aug-2020-3,8972,899

tcp-mib/H14-Aug-2020-8,4213,908

tlstm-mib/H14-Aug-2020-4,3032,998

tsm-mib/H14-Aug-2020-196125

tunnel/H14-Aug-2020-1,045749

ucd-snmp/H14-Aug-2020-19,61913,581

udp-mib/H14-Aug-2020-3,9532,014

util_funcs/H14-Aug-2020-605373

utilities/H14-Aug-2020-1,021742

Makefile.dependH A D14-Aug-20201.2 MiB18,47218,469

Makefile.inH A D14-Aug-20201,001 4121

READMEH A D14-Aug-20204.4 KiB11492

README.smuxH A D14-Aug-20202.1 KiB5336

Rmon.hH A D14-Aug-20201.9 KiB577

agent_mibs.hH A D14-Aug-2020280 109

agentx.hH A D14-Aug-2020174 75

default_modules.hH A D14-Aug-20201.6 KiB5735

disman.hH A D14-Aug-2020412 135

etherlike-mib.hH A D14-Aug-2020117 82

examples.hH A D14-Aug-2020145 54

header_complex.cH A D14-Aug-202019.4 KiB639477

header_complex.hH A D14-Aug-20204.3 KiB8264

host.hH A D14-Aug-20204.4 KiB9814

host_res.hH A D14-Aug-20202.1 KiB8968

if-mib.hH A D14-Aug-2020129 83

ip-forward-mib.hH A D14-Aug-2020172 83

ip-mib.hH A D14-Aug-2020422 1611

kernel_sunos5.cH A D14-Aug-202057.9 KiB2,0681,534

kernel_sunos5.hH A D14-Aug-20205.9 KiB212134

mibII.hH A D14-Aug-20201.8 KiB5937

mibdefs.hH A D14-Aug-2020378 156

mibincl.hH A D14-Aug-20201.1 KiB4939

notification-log-mib.hH A D14-Aug-202099 32

notification.hH A D14-Aug-2020164 53

rmon-mib.hH A D14-Aug-2020109 92

sctp-mib.hH A D14-Aug-202098 43

smux.hH A D14-Aug-202096 51

smux_gated.hH A D14-Aug-2020164 73

snmp-notification-mib.hH A D14-Aug-2020105 32

snmp-usm-dh-objects-mib.hH A D14-Aug-2020264 96

snmpv3mibs.hH A D14-Aug-2020409 1710

struct.hH A D14-Aug-20201.1 KiB5338

target.hH A D14-Aug-2020189 65

tcp-mib.hH A D14-Aug-2020189 83

testhandler.cH A D14-Aug-202013 KiB422284

testhandler.hH A D14-Aug-2020239 105

tlstm-mib.hH A D14-Aug-2020338 127

tsm-mib.hH A D14-Aug-2020160 73

tunnel.hH A D14-Aug-2020165 73

ucd_snmp.hH A D14-Aug-2020699 2220

udp-mib.hH A D14-Aug-2020105 62

util_funcs.cH A D14-Aug-202036.8 KiB1,240973

util_funcs.hH A D14-Aug-20203.5 KiB10789

utilities.hH A D14-Aug-2020102 43

winExtDLL.cH A D14-Aug-202072.1 KiB1,9141,329

winExtDLL.hH A D14-Aug-2020648 2711

README

1This directory holds the implementation of individual MIB groups.
2Currently, this contains the eight MIB-2 groups, plus a basic template
3for new MIB groups (examples/example.c and examples/example.h)
4
5Additionally, you may wish to check out the 'mib2c' perl script in the
6SRCDIR/local directory that can convert a written mib into C template
7files for use with this package as mib modules.
8
9Each group consists of two files:
10
11  examples/example.h:	interface information
12
13	- declaration of the initialisation function 'init_example'
14		(optional)
15	- declaration of the function(s) for retrieving variable
16		information 'var_example'
17	- declaration of the function(s) for setting variable
18		information (if appropriate)
19
20	- declaration of the function(s) for parsing the snmpd.conf file
21		(optional)
22        - a call to config_parse_dot_conf() to explain to the .conf
23		parser which tokens we want to parse.
24		(optional)
25
26	- definitions of the MIB group 'magic numbers'
27		declarations of the 'public' functions
28
29	- a list of the variables in the group, including
30		type information, mapping between magic numbers
31		and OID sub-identifiers within the group,
32		accessibility information, and the relevant
33		function for retrieving this variable's value.
34                They *must* be listed in the mib-descending order.
35	- a call to 'config_load_mib', identifying the location of
36		this MIB group within the general MIB structure.
37	- a call to 'config_require' to identify any other files
38		that are required by the implementation of this group.
39		(optional)
40
41    (these last three are only visible within the 'glue' file 'snmp_vars.c'
42	(if at all), but are declared here for ease of maintainance)
43
44
45
46  examples/example.c:	implementation code
47		(can be non-existant if only the .h file is needed)
48
49	- a list of kernel information needed to report
50		on this group
51	- an initialisation function (optional)
52        - a routine to parse an snmpd.conf line.
53        - a routine to free resources from above and return to
54                default settings.
55	- 'header' function(s) to map the OID requested
56		to the next appropriate OID
57		(and similar system-independent setup)
58	- function(s) (possibly system-specific) to
59		determine and return the value of the
60		variable requested.
61	- (optionally) functions used to set values
62	- other functions used internally
63
64
65To implement a new MIB group, copy the two files 'example.c'
66and 'example.h' to appropriate new files ({MODULENAME}.c and {MODULENAME}.h),
67and edit them as follows:
68
69	example.h:
70		globally change "example" to the new module name
71		    and update the initial comment.
72		replace the EXAMPLE* defines with the list of
73		    variables within this new group
74		fill in the 'MODULENAME_variables' structure with these
75		    new variables, updating the type, accessibility
76		    and sub-identifier information as appropriate.
77		replace 'variableN' with the maximum size of the
78		    returned OID (omitting the group prefix).
79		    For non-table values, this will probably be one
80		    greater than the length of the sub-identifier.
81                update or remove the 'config_parse_dot_conf' call if
82                    you need to handle lines in the snmpd.conf files.
83		update the 'config_load_mib' call with the appropriate
84		    location within the global MIB structure, and
85		    its length (note that 'MIB' has length 6)
86		provide a suitable 'config_require' call if this
87		    code uses routines from any other files within
88		    the 'mibgroup' directory (such as 'util_funcs.c')
89
90
91
92	example.c:
93		globally change "example" to the new module name
94		    and update the initial comment.
95		replace the 'MODULENAME_nl' name list with any necessary
96		    kernel variables, and update the associated #define's
97		replace the name length definition within the 'header'
98		    function with the length of the requesting OID
99		    (i.e. the sum of the lengths given in the subtree
100		     definition, and the variable structure above).
101		replace the basic 'switch' structure within the
102		    'var_MODULENAME' function with the necessary code
103		    to calculate the required information.
104		(plus any other internal functions as needed).
105
106  It will then be necessary to (re-)run the configure script with the
107option
108	--with-mib-modules="MODULENAME"
109
110(where MODULENAME matches the name of the .c/.h file pair exactly).
111Note that if anything in the config_* macros changes, or the init function
112is added or removed, then the configure script will need to be re-run.
113
114

README.smux

1[1] What is SMUX?
2
3SMUX is the snmp multiplexing protocol (RFC 1227). It can be used by an
4snmp agent to query variables maintained by another user-level process.
5
6[2] Why is it relevant to net-snmp?
7
8The original ucd-snmp agent needed a mechanism to query statistics from
9GateD.  GateD has traditionally supported this functionality via SMUX.
10Hence SMUX was implemented within the ucd-snmp framework to extract
11routing protocol statistics from GateD.
12
13net-snmp continues to support smux, and many applications still use it.
14
15[3] What is GateD?
16
17GateD is the 'Gateway Daemon' which implements a variety of routing
18protocols on a variety of platforms (OSes). This was formerly available
19as open source, but has since been made closed and entirely un-free.
20Other routing protocol daemons such a quagga (http://www.quagga.net)
21support SMUX.
22
23[4] Can SMUX extract statistics from other user-level processes?
24
25Yes, the current implementation allows for the registration of any MIB
26that might be registered by a SMUX peer.
27
28[5] How does it work?
29
30Assuming 'snmpd' is already up and running, when the SMUX peer comes up,
31it identifies itself with an oid identifier and string password, and
32registers any MIBs it would like to implement.  When 'snmpd' receives
33queries for these MIBs, it passes these queries to the peer.
34
35[6] Who implemented SMUX for ucd-snmp?
36
37SMUX was implemented by Rohit Dube. He had oodles of help from
38ucd-snmp-coders (Dave, Niels, Wes, Simon, Felix, Leonti) and gated-people
39(Acee, Feiyi, Larry, Sue). [If I missed somebody, sorry in advance and
40do let me know].  Later, Nick Amato re-write the entire SMUX package so
41the code today is mostly his.
42
43[7] How do I find out more about SMUX?
44
45Read the RFC and the code, mainly, but only for legacy code.
46
47*New* sub-agent development should use the AgentX protocol instead,
48which is not only standardized (RFC 2741 + 2742), but is outright superior
49to smux in a number of important ways (handles SET requests reliably,
50able to handle overlapping registrations, aware of SNMPv3 contexts, etc.)
51
52Only build new smux support if you have to.
53