|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 03-May-2022 | - |
| Rmon/ | H | 14-Aug-2020 | - | 5,534 | 4,080 |
| agent/ | H | 14-Aug-2020 | - | 4,135 | 3,013 |
| agentx/ | H | 14-Aug-2020 | - | 5,345 | 3,966 |
| deliver/ | H | 14-Aug-2020 | - | 517 | 377 |
| disman/ | H | 14-Aug-2020 | - | 44,573 | 29,833 |
| etherlike-mib/ | H | 14-Aug-2020 | - | 5,131 | 2,231 |
| examples/ | H | 14-Aug-2020 | - | 3,605 | 1,862 |
| hardware/ | H | 14-Aug-2020 | - | 6,223 | 4,482 |
| host/ | H | 14-Aug-2020 | - | 14,202 | 10,639 |
| if-mib/ | H | 14-Aug-2020 | - | 16,757 | 8,288 |
| ip-forward-mib/ | H | 14-Aug-2020 | - | 15,905 | 6,676 |
| ip-mib/ | H | 14-Aug-2020 | - | 47,562 | 21,246 |
| ipfwchains/ | H | 14-Aug-2020 | - | 5 | 4 |
| mibII/ | H | 14-Aug-2020 | - | 27,780 | 21,958 |
| misc/ | H | 14-Aug-2020 | - | 421 | 301 |
| notification/ | H | 14-Aug-2020 | - | 2,761 | 1,774 |
| notification-log-mib/ | H | 14-Aug-2020 | - | 792 | 524 |
| rmon-mib/ | H | 14-Aug-2020 | - | 7,066 | 3,105 |
| sctp-mib/ | H | 14-Aug-2020 | - | 5,640 | 4,166 |
| smux/ | H | 14-Aug-2020 | - | 3,303 | 2,473 |
| snmp-notification-mib/ | H | 14-Aug-2020 | - | 6,776 | 2,646 |
| snmp-usm-dh-objects-mib/ | H | 14-Aug-2020 | - | 5,218 | 2,219 |
| snmpv3/ | H | 14-Aug-2020 | - | 2,167 | 1,494 |
| target/ | H | 14-Aug-2020 | - | 3,897 | 2,899 |
| tcp-mib/ | H | 14-Aug-2020 | - | 8,421 | 3,908 |
| tlstm-mib/ | H | 14-Aug-2020 | - | 4,303 | 2,998 |
| tsm-mib/ | H | 14-Aug-2020 | - | 196 | 125 |
| tunnel/ | H | 14-Aug-2020 | - | 1,045 | 749 |
| ucd-snmp/ | H | 14-Aug-2020 | - | 19,619 | 13,581 |
| udp-mib/ | H | 14-Aug-2020 | - | 3,953 | 2,014 |
| util_funcs/ | H | 14-Aug-2020 | - | 605 | 373 |
| utilities/ | H | 14-Aug-2020 | - | 1,021 | 742 |
| Makefile.depend | H A D | 14-Aug-2020 | 1.2 MiB | 18,472 | 18,469 |
| Makefile.in | H A D | 14-Aug-2020 | 1,001 | 41 | 21 |
| README | H A D | 14-Aug-2020 | 4.4 KiB | 114 | 92 |
| README.smux | H A D | 14-Aug-2020 | 2.1 KiB | 53 | 36 |
| Rmon.h | H A D | 14-Aug-2020 | 1.9 KiB | 57 | 7 |
| agent_mibs.h | H A D | 14-Aug-2020 | 280 | 10 | 9 |
| agentx.h | H A D | 14-Aug-2020 | 174 | 7 | 5 |
| default_modules.h | H A D | 14-Aug-2020 | 1.6 KiB | 57 | 35 |
| disman.h | H A D | 14-Aug-2020 | 412 | 13 | 5 |
| etherlike-mib.h | H A D | 14-Aug-2020 | 117 | 8 | 2 |
| examples.h | H A D | 14-Aug-2020 | 145 | 5 | 4 |
| header_complex.c | H A D | 14-Aug-2020 | 19.4 KiB | 639 | 477 |
| header_complex.h | H A D | 14-Aug-2020 | 4.3 KiB | 82 | 64 |
| host.h | H A D | 14-Aug-2020 | 4.4 KiB | 98 | 14 |
| host_res.h | H A D | 14-Aug-2020 | 2.1 KiB | 89 | 68 |
| if-mib.h | H A D | 14-Aug-2020 | 129 | 8 | 3 |
| ip-forward-mib.h | H A D | 14-Aug-2020 | 172 | 8 | 3 |
| ip-mib.h | H A D | 14-Aug-2020 | 422 | 16 | 11 |
| kernel_sunos5.c | H A D | 14-Aug-2020 | 57.9 KiB | 2,068 | 1,534 |
| kernel_sunos5.h | H A D | 14-Aug-2020 | 5.9 KiB | 212 | 134 |
| mibII.h | H A D | 14-Aug-2020 | 1.8 KiB | 59 | 37 |
| mibdefs.h | H A D | 14-Aug-2020 | 378 | 15 | 6 |
| mibincl.h | H A D | 14-Aug-2020 | 1.1 KiB | 49 | 39 |
| notification-log-mib.h | H A D | 14-Aug-2020 | 99 | 3 | 2 |
| notification.h | H A D | 14-Aug-2020 | 164 | 5 | 3 |
| rmon-mib.h | H A D | 14-Aug-2020 | 109 | 9 | 2 |
| sctp-mib.h | H A D | 14-Aug-2020 | 98 | 4 | 3 |
| smux.h | H A D | 14-Aug-2020 | 96 | 5 | 1 |
| smux_gated.h | H A D | 14-Aug-2020 | 164 | 7 | 3 |
| snmp-notification-mib.h | H A D | 14-Aug-2020 | 105 | 3 | 2 |
| snmp-usm-dh-objects-mib.h | H A D | 14-Aug-2020 | 264 | 9 | 6 |
| snmpv3mibs.h | H A D | 14-Aug-2020 | 409 | 17 | 10 |
| struct.h | H A D | 14-Aug-2020 | 1.1 KiB | 53 | 38 |
| target.h | H A D | 14-Aug-2020 | 189 | 6 | 5 |
| tcp-mib.h | H A D | 14-Aug-2020 | 189 | 8 | 3 |
| testhandler.c | H A D | 14-Aug-2020 | 13 KiB | 422 | 284 |
| testhandler.h | H A D | 14-Aug-2020 | 239 | 10 | 5 |
| tlstm-mib.h | H A D | 14-Aug-2020 | 338 | 12 | 7 |
| tsm-mib.h | H A D | 14-Aug-2020 | 160 | 7 | 3 |
| tunnel.h | H A D | 14-Aug-2020 | 165 | 7 | 3 |
| ucd_snmp.h | H A D | 14-Aug-2020 | 699 | 22 | 20 |
| udp-mib.h | H A D | 14-Aug-2020 | 105 | 6 | 2 |
| util_funcs.c | H A D | 14-Aug-2020 | 36.8 KiB | 1,240 | 973 |
| util_funcs.h | H A D | 14-Aug-2020 | 3.5 KiB | 107 | 89 |
| utilities.h | H A D | 14-Aug-2020 | 102 | 4 | 3 |
| winExtDLL.c | H A D | 14-Aug-2020 | 72.1 KiB | 1,914 | 1,329 |
| winExtDLL.h | H A D | 14-Aug-2020 | 648 | 27 | 11 |
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