�ɲɾ�����ӯ�����һ��ˣ��������С���˴��ͣ�������P���ҹ��ñ˽��ά�Բ��������˸߸ԣ�������ơ��ҹ��ñ�����ά�Բ���ˡ���˳^�ӣ������ӡ� ���ͯj�ӣ��ƺ���ӣ� ? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!? PNG ?%k25u25%fgd5n!PKz0]9 9 mib_indexes/0nu[DIR /usr/share/snmp/mibs UCD-DISKIO-MIB UCD-DISKIO-MIB.txt IPV6-FLOW-LABEL-MIB IPV6-FLOW-LABEL-MIB.txt IPV6-ICMP-MIB IPV6-ICMP-MIB.txt NET-SNMP-TC NET-SNMP-TC.txt SCTP-MIB SCTP-MIB.txt SNMP-USER-BASED-SM-MIB SNMP-USER-BASED-SM-MIB.txt NET-SNMP-PASS-MIB NET-SNMP-PASS-MIB.txt IPV6-TC IPV6-TC.txt IPV6-MIB IPV6-MIB.txt LM-SENSORS-MIB LM-SENSORS-MIB.txt SNMP-NOTIFICATION-MIB SNMP-NOTIFICATION-MIB.txt DISMAN-EVENT-MIB DISMAN-EVENT-MIB.txt DISMAN-SCHEDULE-MIB DISMAN-SCHEDULE-MIB.txt NET-SNMP-EXTEND-MIB NET-SNMP-EXTEND-MIB.txt IANA-ADDRESS-FAMILY-NUMBERS-MIB IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt SNMPv2-TM SNMPv2-TM.txt UCD-DEMO-MIB UCD-DEMO-MIB.txt NETWORK-SERVICES-MIB NETWORK-SERVICES-MIB.txt SNMP-USM-DH-OBJECTS-MIB SNMP-USM-DH-OBJECTS-MIB.txt MTA-MIB MTA-MIB.txt HOST-RESOURCES-MIB HOST-RESOURCES-MIB.txt EtherLike-MIB EtherLike-MIB.txt UDP-MIB UDP-MIB.txt IANA-LANGUAGE-MIB IANA-LANGUAGE-MIB.txt NET-SNMP-VACM-MIB NET-SNMP-VACM-MIB.txt AGENTX-MIB AGENTX-MIB.txt IF-MIB IF-MIB.txt RFC1213-MIB RFC1213-MIB.txt NET-SNMP-EXAMPLES-MIB NET-SNMP-EXAMPLES-MIB.txt IANAifType-MIB IANAifType-MIB.txt SNMP-MPD-MIB SNMP-MPD-MIB.txt IANA-RTPROTO-MIB IANA-RTPROTO-MIB.txt IF-INVERTED-STACK-MIB IF-INVERTED-STACK-MIB.txt TRANSPORT-ADDRESS-MIB TRANSPORT-ADDRESS-MIB.txt RFC1155-SMI RFC1155-SMI.txt HCNUM-TC HCNUM-TC.txt IP-MIB IP-MIB.txt IPV6-UDP-MIB IPV6-UDP-MIB.txt NET-SNMP-AGENT-MIB NET-SNMP-AGENT-MIB.txt TUNNEL-MIB TUNNEL-MIB.txt SNMP-TARGET-MIB SNMP-TARGET-MIB.txt SNMPv2-TC SNMPv2-TC.txt UCD-DLMOD-MIB UCD-DLMOD-MIB.txt SMUX-MIB SMUX-MIB.txt TCP-MIB TCP-MIB.txt NET-SNMP-MIB NET-SNMP-MIB.txt SNMP-FRAMEWORK-MIB SNMP-FRAMEWORK-MIB.txt SNMP-USM-AES-MIB SNMP-USM-AES-MIB.txt DISMAN-SCRIPT-MIB DISMAN-SCRIPT-MIB.txt RMON-MIB RMON-MIB.txt SNMPv2-CONF SNMPv2-CONF.txt INET-ADDRESS-MIB INET-ADDRESS-MIB.txt BRIDGE-MIB BRIDGE-MIB.txt SNMP-VIEW-BASED-ACM-MIB SNMP-VIEW-BASED-ACM-MIB.txt IP-FORWARD-MIB IP-FORWARD-MIB.txt SNMP-COMMUNITY-MIB SNMP-COMMUNITY-MIB.txt RFC-1215 RFC-1215.txt UCD-IPFWACC-MIB UCD-IPFWACC-MIB.txt SNMP-PROXY-MIB SNMP-PROXY-MIB.txt SNMP-USM-HMAC-SHA2-MIB SNMP-USM-HMAC-SHA2-MIB.txt SNMPv2-SMI SNMPv2-SMI.txt SNMPv2-MIB SNMPv2-MIB.txt UCD-SNMP-MIB UCD-SNMP-MIB.txt SNMP-TSM-MIB SNMP-TSM-MIB.txt HOST-RESOURCES-TYPES HOST-RESOURCES-TYPES.txt NOTIFICATION-LOG-MIB NOTIFICATION-LOG-MIB.txt IPV6-TCP-MIB IPV6-TCP-MIB.txt SNMP-TLS-TM-MIB SNMP-TLS-TM-MIB.txt PK{0]?U"" README.agentxnu[ Net-SNMP contains a reasonably full implementation of the AgentX agent extensibility protocol (RFC 2741) in as much as it supports all the protocol operations described in this document. The core functionality has received a reasonable amount of exposure, and is believed to be more or less stable in normal use. It will also handle the non-graceful termination of subagents - returning a 'genErr' error for three successive requests before unregistering the unresponsive subagent. A subagent will attempts to re-establish contact with a dead and resurrected master based on the agentxPingInterval setting. The default for this configuration variable is 15 seconds. It can be changed by putting the following line in your APPLICATION.conf file: agentxPingInterval 60 will make the subagent try to ping the master every 60 seconds, and if the connection is deemed broken it'll try and reconnect to the master agent after that point (once every 60 seconds). Similarly, a subagent will not be able to re-register in place of a defunct colleague until the master agent has received three requests for the dead connection (and hence unregistered it). Some of the less frequently used features (index allocation, range registration, etc), have received less thorough testing, and may well not be fully functional. Some of the omissions of the earlier release (use of GetBulk, the AgentX MIB) are still missing from this version. AgentX support is now included in the agent by default, but needs to be explicitly enabled before use. Activate it using by putting a line master agentx in the snmpd.conf file. This support is also enabled automatically when the '-x' flag is given (to specify a different master AgentX socket), or when the agent is invoked as an AgentX subagent (i.e. via the name 'agentxd' or with the '-X' flag). See the main project web page for an examples of a simple stand-alone subagent. (http://www.net-snmp.org/tutorial/tutorial-5/toolkit/) Please report any problems experienced to the net-snmp-coders list. Dave PK{0]>ChangeLog.trimmednu[# -*- text -*- ---------------------------------------------------------------------- Changes: V5.8.rc4 -> V5.8 commit caff5ff65cd72664dedea827356f966317aa7a6d Author: Robert Story Date: Mon Jul 16 09:40:09 2018 -0400 make depend for 5.8 commit faac86366307666c02ce813f45180a068fc92dba Author: Robert Story Date: Mon Jul 16 00:23:22 2018 -0400 master out of Release Candidate commit 3aa9e011267435fc62efda4cbfc97d53a0acf0ab Author: Robert Story Date: Sun Jul 15 23:50:23 2018 -0400 Version number update: 5.8 commit dfd0604c19f6cc0d8cffce7d50e1c513266544c9 Author: Bart Van Assche Date: Thu Jun 21 19:22:37 2018 -0700 snmplib/transports: Unbreak the MSVC build Adding an integer to a void pointer works fine with gcc but not with MSVC. Hence convert the expressions that add an integer to a void pointer into a construct that is standard C. ---------------------------------------------------------------------- Changes: V5.8.rc3 -> V5.8.rc4 commit 7a6dfaaeeffd4c6fdecbaf26371e7da8e778a67a Author: Robert Story Date: Thu Jun 28 18:33:54 2018 -0400 make depend for 5.8.rc4 commit 826a0a326fc15cfc4bbefb6a316dc0376a6f4c0a Author: Robert Story Date: Thu Jun 28 18:25:56 2018 -0400 Version number update: 5.8.rc4 commit 2b1d51aba50992549de03f76b77f045c63bd1296 Author: Bart Van Assche Date: Fri Jun 8 07:39:27 2018 +0200 SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress See also https://sourceforge.net/p/net-snmp/bugs/2871/. Reported-by: Anders Wallin Fixes: 3bd8dc8b2d90 ("snmplib/transports: Avoid that the create_from_ostring methods truncate IPv6 addresses") ---------------------------------------------------------------------- Changes: V5.8.rc2 -> V5.8.rc3 commit 780f24a0189591c37b240cdb8ab99af631f8aeb8 Author: Robert Story Date: Fri May 25 15:53:41 2018 -0400 make depend for 5.8.rc3 commit f25d035172fb18a730c0e70ee8f23cc419a36d88 Author: Robert Story Date: Fri May 25 15:18:34 2018 -0400 Version number update: 5.8.rc3 commit c60e23b0c0979dbb2a034ff23f29fb10062213ef Author: Robert Story Date: Fri May 25 15:09:13 2018 -0400 don't auto merge dist/release this might pull in undesired changes during release commit fe5c40acf61f4c08cad72724a24208167d4fc378 Author: Robert Story Date: Fri May 25 15:01:24 2018 -0400 dist script to run right version of autoheader commit f83f865d8a0843b369695b8e23cb794c723e6fa8 Author: Bart Van Assche Date: Sun May 20 14:35:24 2018 -0700 Cygwin: Make it again possible to build with OpenSSL Remove #define OPENSSL_SYS_WIN32 since that tells OpenSSL to include the Winsock header file. Define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to avoid that header files are included from that conflict with the OpenSSL header files. This patch avoids that building without --with-openssl=internal fails. This patch reverts 0657b90b7181 ("Cygwin, scapi.h: Fix build") commit c56db2a5880fd0e9bde8eed98c2722a353d39eaa Author: Bart Van Assche Date: Sat May 19 07:49:58 2018 -0700 snmplib: Avoid that sprint_realloc_octet_string() triggers a segmentation fault strlcpy() implementations typically scan for the end of the source argument passed to strlcpy(). Hence avoid passing an unterminated string to strlcpy(). Reported-by: Stuart Henderson Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") ---------------------------------------------------------------------- Changes: V5.8.rc1 -> V5.8.rc2 commit c906e444167cd0c83182da336f274361770f94a6 (HEAD -> master) Author: Robert Story Date: Fri May 18 17:22:09 2018 -0400 make depend for 5.8.rc2 commit 7677ab7fa419f0d77c438b116c38feb622bf8dd4 Author: Robert Story Date: Fri May 18 17:02:25 2018 -0400 Version number update: 5.8.rc2 commit 0b5f73255ad120cd5b6233e0cc64dd0f425494b4 (origin/master, origin/HEAD) Author: Robert Story Date: Fri May 18 13:00:01 2018 -0400 Revert "fix for setting engineBoots and engineTime (e.g. -Z cli arg)" This reverts commit 988562514b05a2bc01be4462b99874d081600252. Further testing needed. commit 737105284bf2d31347cdf2a4510919cb78ec6e8c Author: Bart Van Assche Date: Sat Apr 14 11:32:24 2018 -0700 Add Travis and Appveyor CI support This patch makes it possible to enable Travis and Appveyor continuous integration support. On Travis Net-SNMP is built with all MIBs, with --disable-set-support, with --enable-mini-agent, with --enable-minimalist and with --enable-read-only. All these configurations are built on Linux and on OS/X. On Appveyor Net-SNMP is built with MSVC and dynamic libraries, with MSVC and statically linked libraryes, with MinGW64, with Cygwin32 and with Cygwin64. As one can see in the scripts in the "ci" directory the to-do items are as follows: - Fix the TLSTCP test on Travis. - Fix the MinGW64 build. That build fails with a linker error. - Ensure that walking the entire MIB works on Darwin. - Make the regression tests pass for the Cygwin builds. - Make the regression tests pass for --disable-set-support,s --enable-mini-agent, --enable-minimalist and --enable-read-only. - Make the non-default MIBs compatible with --disable-set-support, --enable-mini-agent, --enable-minimalist and --enable-read-only. commit 03257e5201b9657b87915791585e4068533b1fa1 Author: Niels Baggesen Date: Thu May 17 15:53:54 2018 +0200 Additional patch for NetBSD 8 support. commit e14027bce1615c57770a1eba18423b5a4b97eada (origin/crypto.ch) Author: Niels Baggesen Date: Wed May 16 18:56:08 2018 -0700 MIB-II, at: Fix Solaris build Fixes: 5103db3c189d ("mibII/at: Split into multiple source files") commit 131afbbde6e202f93237fd9769969556a6a3aef5 Author: Bill Fenner Date: Tue May 15 15:05:17 2018 +0000 Don't try to build snmpping when set support is disabled. commit be40ee3f799d66516d00185de86d9472fb153760 Author: Stuart Henderson Date: Fri May 11 21:48:22 2018 +0100 Install missing system header files commit 882e28a5f828c07c5fda835564e60ecc5e38ec92 Author: Bart Van Assche Date: Mon May 7 05:20:46 2018 -0700 Cygwin64: Fix winExtDLL build The winExtDLL code assumes that sizeof(oid) == 4. Hence define the 'oid' type as unsigned int when building with MSVC, MinGW or Cygwin. This patch avoids that building winExtDLL with Cygwin64 fails on the following statement: netsnmp_static_assert(sizeof(oid) == sizeof(UINT)); commit 0d99e0176803c6390405c4ae8e028dfd329ed54a Author: Robert Story Date: Sun May 13 20:31:05 2018 -0400 restore auth/priv defines for protocol OID lengths (for backwards compatability) commit 4b518ed4971126dd874f64e0058347e9d622471b Author: Bart Van Assche Date: Mon May 7 07:47:24 2018 -0700 CHANGES: BUG: 2815: Display UTF-8 characters again Before commit 7f05daa8e0e0 sprint_realloc_octet_string() used memcpy() for ASCII strings. That caused the output to be truncated if a '\0' was embedded in an octet string. Commit 7f05daa8e0e0 fixed that issue but broke UTF-8 support. Restore UTF-8 support by only using sprint_realloc_asciistring() if the octet string contains a '\0'. Fixes: 7f05daa8e0e0 ("CHANGES: BUG: 3444939: BUG: 1796886: snmplib: Avoid that sprint_realloc_octet_string() embeds unprintable control characters or binary zeroes in its output. This behavior could cause truncated output in snmptrapd.") commit f35ebb57b9c3f937db99b2b57728cc1e07ff381a Author: Bart Van Assche Date: Sun May 6 21:13:14 2018 -0700 configure.ac: Fix recently introduced autoreconf warnings A recent patch introduced an invocation of AC_CHECK_HEADER before AC_AIX. However, AC_AIX must be invoked before AC_CHECK_HEADER. Hence move AC_AIX from configure.d/config_os_progs into configure.ac. Additionally, since AC_AIX is obsolete, use AC_USE_SYSTEM_EXTENSIONS instead. This patch fixes all instances of the following autoreconf warnings: configure.d/config_os_progs:98: warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS ../../lib/autoconf/specific.m4:432: AC_AIX is expanded from... configure.d/config_os_progs:98: the top level configure.d/config_os_progs:98: warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS ../../lib/autoconf/specific.m4:432: AC_AIX is expanded from... configure.d/config_os_progs:98: the top level Fixes: eef22ea5f92b ("Verify AES support when --with-openssl is provided") ---------------------------------------------------------------------- Changes: V5.8.pre3 -> V5.8.rc1 commit 0a2738ace2a52e4086c067e5f49df9389e90d353 Author: Robert Story Date: Sun May 6 17:45:17 2018 -0400 Release Candidate for master commit b0fa7f242ab0bc2f7eca72c88f2f2acc325d98af Author: Robert Story Date: Sun May 6 17:45:12 2018 -0400 Version number update: 5.8.rc1 commit 5bfc977c6da865c0265de064964368a760602e75 Author: Robert Story Date: Sun May 6 17:43:00 2018 -0400 regenerate configure commit cc45578c2fa0b94f7762057ee3b8a0b795c497ff Author: Bill Fenner Date: Sun May 6 13:05:55 2018 +0000 snmpd: BUG: 2864: use clientaddr properly The code parsed out the address from the clientaddr spec, then used the return value wrong and only respected it if it existed but didn't parse properly. commit 7eb6eba5677c4e5a3d607df97e4342f122875c94 Author: Robert Story Date: Sun May 6 16:21:02 2018 -0400 dup save string from default store; restore before possible branches commit e56699f5e2ef6b38132a0f497e40c122b6cb5ec4 Author: Bill Fenner Date: Sun May 6 13:05:25 2018 +0000 Add the ability to set the source address with "-s" for trapsess commit a7feed9082dd700068166e0d5b7bdf138760da5f Author: Robert Story Date: Sun May 6 15:55:45 2018 -0400 move declarations to top of function commit 0e24df65b2b095453b46f5101a24e3feed2b6bfb Author: Robert Story Date: Sun May 6 15:52:19 2018 -0400 fix compiler warning commit fdc16201c52f607fea24dc742248373407eca825 Author: Anders Wallin Date: Sun May 6 02:56:51 2018 -0700 CHANGES: BUG: 1366: Pass proper buffer length to netsnmp_tls_fingerprint_build() commit 3da9c1c74e1f1284f981d0a4d5a24406ccb98f87 Author: Bart Van Assche Date: Sat May 5 15:59:17 2018 -0700 libsnmp: Flush persistent config to persistent storage From the fsync() man page: "returns EBADF if fd is not a valid open file descriptor". Hence call fsync() before closing 'fout' instead of after closing it. Ensure that fsync() gets called when building with MSVC on Windows. See also Smith, Stewart, and A. B. MySQL. "Eat My Data: How everybody gets file I/O wrong." OSCON, Portland, Oregon (2008) (http://mirror.linux.org.au/pub/linux.conf.au/2007/video/wednesday/278.pdf). Fixes: 4ae6ed444687 ("call fsync after writing persistent config") commit 82bd09e3d9b94b2e3cc69a4f458c7dcd0bae0845 Author: Bart Van Assche Date: Sat May 5 16:39:04 2018 -0700 SNMP-USM-DH-OBJECTS-MIB: Fix a compiler warning Avoid that the following warning is reported when building against an older openssl library: snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c: In function 'init_usmDHParameters': snmp-usm-dh-objects-mib/usmDHParameters/usmDHParameters.c:44:9: warning: implicit declaration of function 'DH_set0_pqg' [-Wimplicit-function-declaration] DH_set0_pqg(dh_params, p, NULL, g); ^ See also commit 3317a7c66362 ("Remove duplicated function in usmDHParameters.c that breaks compilation with LibreSSL 2.7.2 (OpenBSD 6.3)") commit 71f4d0a8b369b2dfe0e85bd2e3664be0d8bfe7a8 Author: Robert Story Date: Sat May 5 00:48:16 2018 -0400 add fallthrough comment to quell compiler warning commit 4ae6ed444687f32b69c04d5b7d1bc868fd67d195 Author: Robert Story Date: Sat May 5 00:46:39 2018 -0400 call fsync after writing persistent config commit b42547643a235501a60d993c0789f2d420e2394d Author: Robert Story Date: Sat May 5 00:32:43 2018 -0400 remove unused variables commit ec684fd45895f015cce790671322293b8cdf6d0d Author: Robert Story Date: Thu May 3 12:21:19 2018 -0400 Add more names to README commit f42aeb52e63147b5789cccde1ef997370191849e Author: Bart Van Assche Date: Fri May 4 04:39:53 2018 -0700 CHANGES: BUG: 2831: Move libnetsnmpagent global variable declarations into a separate header file Because commit 81b65f4d23a9 added declarations for several global variables to public header files, applications that declare global variables with the same names no longer build. Hence move the global variables that were added by that commit to public header files into a new header file. Fixes: 81b65f4d23a9 ("Move declarations of global functions and variables from .c to .h") commit 6a42ba096b7efc1690ed83d5951289bd64e1b091 Author: Niels Baggesen Date: Fri May 4 15:07:18 2018 +0200 NetBSD 8 only exports krb5_auth_con_getsendsubkey, so separate configure detection for krb5_auth_con_getrecvsubkey and krb5_auth_con_getsendsubkey. commit 54f87b6b6b80b440d4db7c4c676703f57fccd19a Author: Niels Baggesen Date: Fri May 4 15:05:01 2018 +0200 Support for NetBSD 8 commit 3317a7c66362b01b4fd3c0f32a38b10ea53cb4cb Author: Niels Baggesen Date: Fri May 4 15:02:56 2018 +0200 Remove duplicated function in usmDHParameters.c that breaks compilation with LibreSSL 2.7.2 (OpenBSD 6.3) commit e8ed8e5eab1813f15964823741f04163c1c1b326 Author: Niels Baggesen Date: Fri May 4 14:59:35 2018 +0200 mibs: Add SNMP-USM-HMAC-SHA2-MIB.txt commit eb340300964cf1563e2f9472cfa20ff410cc24e6 Author: Keith Mendoza Date: Tue May 1 09:36:52 2018 -0700 Check if disman/ping was enabled at top of test Checking that the functionality is enabled should occur before checking if a raw socket can be created commit eef22ea5f92bf79dac39b8d26c644f10cd975f68 Author: Keith Mendoza Date: Mon Apr 23 12:23:33 2018 -0700 Verify AES support when --with-openssl is provided --enable-bluementhal-aes needs the OpenSSL AES library commit 5c9c9f92383112e9c263dfd3da7ab27245504025 Author: Bart Van Assche Date: Fri Apr 27 20:18:21 2018 -0700 Win32: Export set_enginetime() to unbreak the DLL build Fixes: 988562514b05 ("fix for setting engineBoots and engineTime (e.g. -Z cli arg)") commit 8625748d09081563887051651957d119d7387f15 Author: Robert Story Date: Fri Apr 27 17:05:09 2018 -0400 fix path in rsync command commit 2b4941946deb6eb0294f8a6794d20f92801e4a67 Author: Eugene M. Kim Date: Tue Oct 17 18:17:23 2017 -0700 Fix/enforce ipDefaultRouterLifetime value range IP-MIB defines ipDefaultRouterLifetime to be in 0..65535 range, but the current code 1) erroneously uses 0xFFFFFFFFUL (4294967296) as the max value, and 2) does not clip the computed value that exceeds the maximum (this was unnecessary probably because the max value was also the max value permitted for the underlying type uint32_t). Fix IPDEFAULTROUTERLIFETIME_MAX to be 65535 (0xFFFF) and clip out-of-range values to the max value. ---------------------------------------------------------------------- Changes: V5.8.pre2 -> V5.8.pre3 commit c3d1c9ea1632343641b09c960b0594e8d85778b6 Author: Robert Story Date: Fri Apr 27 15:58:14 2018 -0400 tweak comments to remove embedded C++ style comments commit 6f68d4c77d00a6aebdb0ddbfe9e1fa3c0da3fba8 Author: Robert Story Date: Fri Apr 27 14:53:57 2018 -0400 ignore swap files commit 1302012b5faebf0cd511f98d7ef94c13f9593036 Author: Robert Story Date: Fri Apr 27 14:52:37 2018 -0400 Version number update: 5.8.pre3 commit 27edef51c4c45b2dd31177dcdb60c825927e6d95 Author: Robert Story Date: Fri Apr 27 14:51:02 2018 -0400 update makerelease repository; change SVN references to git commit 988562514b05a2bc01be4462b99874d081600252 Author: Robert Story Date: Fri Apr 27 14:44:00 2018 -0400 fix for setting engineBoots and engineTime (e.g. -Z cli arg) commit bcc4ac1490fc1fda25b0449daef8a89393857bf5 Author: Robert Story Date: Fri Apr 27 14:29:43 2018 -0400 always dup Apsz and Xpsz since they are unconditionally freed commit 6c1b10eae8433da9ed0a1801e4842b2bd2bcca13 Author: Robert Story Date: Fri Apr 27 12:46:28 2018 -0400 remove C++ style comments commit 66a47d6914e426778c1975db48a74104244485a3 Author: Robert Story Date: Fri Apr 27 12:45:07 2018 -0400 add copyrights to files split from at.c commit 6219d6574cfa120748ba7f271afcd7f1e52d4fcf Author: Robert Story Date: Fri Apr 27 12:46:06 2018 -0400 fix build by removing premature headers these caused the convenience typedefs such as u_long and u_char to not be defined commit 8c4cff6b749c396b920925255853a54408c6bbd1 Author: Anders Wallin Date: Wed Apr 11 09:27:28 2018 +0200 TLSTM MIB: Fix support for sha256, 384 and 512 fingerprints Increase the fingerprint buffers such that these can fit sha256, 384 and 512 fingerprints. Signed-off-by: Anders Wallin [ bvanassche: edited commit message ] commit c514d7f1394e44ea21fb01929b1dffc1a03c858f Author: Anders Wallin Date: Thu Apr 26 17:21:21 2018 +0200 TLSTM MIB: Fix cache handler for snmpTlstmCertToTSNCount Signed-off-by: Anders Wallin commit 2014d49a94ce0ea66f967ed5fda7b4685cbabda1 Author: Bart Van Assche Date: Wed Apr 25 16:44:25 2018 -0600 Win32: Clean up libsnmp Makefiles commit 1449f8ac2d4d7c8df639bb242a4f004ed24ef70c Author: Bart Van Assche Date: Wed Apr 25 19:06:25 2018 -0600 Win32, MSVC, OpenSSL: Link with the correct libraries commit 46bd69b6f598978b7a1fc61da13c7dbc0ecda0bc Author: Bart Van Assche Date: Wed Apr 25 17:27:07 2018 -0600 Win32, TLS transport: Avoid that the compiler complains about symbol redefinitions commit 65d73540715fd90964a0c6737411dfe6501d1551 Author: Bart Van Assche Date: Wed Apr 25 17:25:46 2018 -0600 MSVC: Add defines to net-snmp-config.h for the latest OpenSSL library commit 93453d25593135ded56c24492d17892ba47d93d8 Author: Bart Van Assche Date: Wed Apr 25 16:44:25 2018 -0600 Win32: Clean up libsnmp Makefiles commit 47e6ff61f5aa27dd87bfc4e301dfc39501b75f87 Author: Andrew Stormont Date: Wed Apr 25 14:56:12 2018 -0600 Solaris, libsnmp: Avoid that linking fails due to an undefined reference to in6addr_any commit cf139ad64cc85c3dd155336fec8e3e261fb548eb Author: Andrew Stormont Date: Wed Apr 25 06:57:24 2018 -0600 Solaris, Host Resources MIB: Fix process argument parsing See also https://sourceforge.net/p/net-snmp/patches/1361/. commit 2d96aada9c3c61d204125188a55cc3f10c14af03 Author: Andrew Stormont Date: Wed Apr 25 06:46:54 2018 -0600 Solaris, hardware: Display full CPU description See also https://sourceforge.net/p/net-snmp/patches/1360/. commit 55575b4027633c86e5f7633eea24549476466187 Author: Bart Van Assche Date: Tue Apr 24 17:28:59 2018 -0600 agent/kernel.c: Fix MSVC build commit f640af307e36115dca631922e0762438b74c4b12 Author: Bart Van Assche Date: Tue Apr 24 17:32:35 2018 -0600 Fix configure.d/config_net_snmp_config_h Fixes: e835935dbae5 ("Patches: 1358: Uncouple kmem support from NETSNMP_CAN_USE_NLIST") commit d6eb690cbee7854a26a213017c4ae24258c1cf21 Author: Bart Van Assche Date: Tue Apr 24 10:02:58 2018 -0600 snmplib, IPv4 transport: Avoid that -Dnetsnmp_tcp triggers an assertion failure Fixes: e3fd8c38503f ("snmplib/transports/snmpIPv4BaseDomain.c: Make netsnmp_ipv4_fmtaddr() more robust") Note: before the aforementioned commit -Dnetsnmp_tcp triggered an out-of-bounds read. commit 9a1e91009dc149de135107d75b6dce7404d2982e Author: Bart Van Assche Date: Tue Apr 24 10:19:45 2018 -0600 Avoid that the compiler complains about missing declarations for init_kmem() and free_kmem() Fixes: 06c2d80d0aa5 ("Merge branch 'V5-7-patches'") commit 25bfa920013983e96e433e93e5fc2331730a46f2 Author: Andrew Stormont Date: Tue Apr 24 09:06:52 2018 -0600 MIB-II, host resources, BSD: Remove redundant code from sh_count_procs() commit ddc6c6fa08747beb74663d3efbf73843e45637db Author: Andrew Stormont Date: Tue Apr 24 09:08:24 2018 -0600 MIB-II, host resources, BSD: Fix a memory leak in netsnmp_arch_swrun_container_load() commit e835935dbae5ee2dbd9fa13a24e34b2862c7a4bf Author: Andrew Stormont Date: Tue Apr 24 07:56:44 2018 -0600 Patches: 1358: Uncouple kmem support from NETSNMP_CAN_USE_NLIST commit acd4ee40cbb5d6c713e7471f1b7da4bdd0064574 Author: Bart Van Assche Date: Mon Apr 23 10:18:27 2018 -0600 configure: Avoid that probing of SSL transport modules fails Avoid that probing of the DTLSUDP and TLSTCP transport modules fails as follows if --with-openssl= has been specified: checking for and configuring transport modules to use... In file included from module_tmp_header.h:177: ./include/net-snmp/library/snmpTLSBaseDomain.h:13:10: fatal error: 'openssl/bio.h' file not found #include "openssl/bio.h" ^ 1 error generated. In file included from module_tmp_header.h:177: ./include/net-snmp/library/snmpTLSBaseDomain.h:13:10: fatal error: 'openssl/bio.h' file not found #include "openssl/bio.h" ^ commit 3c104af5de3d19ef913a4480960a5012cb8501ec Author: Bart Van Assche Date: Mon Apr 23 06:57:03 2018 -0600 Darwin: Let the configure script determine whether or not SHA256 and SHA512 are available commit 9ddf75dfb643ccf23982f5054b6efb47d5214bb3 Author: Bill Fenner Date: Wed Apr 11 11:32:05 2018 -0700 Fix minimal agent with tls: move X509_get_signature_nid outside NETSNMP_FEATURE_REMOVE_CERT_DUMP_NAMES commit ae88f1a5cea848b6ed561687b79d7b42b574a268 Author: Bart Van Assche Date: Sat Apr 21 22:35:53 2018 -0700 Win32: Fix MIB-II build commit 5103db3c189d87af1bd7e39c1d9e7bacc89cbf5e Author: Bart Van Assche Date: Thu Apr 12 11:22:29 2018 -0600 mibII/at: Split into multiple source files Split the implementations of ARP_Scan_Init(), ARP_Scan_Next() and var_atEntry() into one function per platform and move these implementations to separate source files. Additionally, move the ARPTAB_SYMBOL and ARPTAB_SIZE_SYMBOL definitions from the include/net-snmp/system/*.h include files into the mibII/at implementation. This change reduces the number of #ifdefs in the mibII/at code drastically. commit a16d7742e412c9eee684118ea899b7165f4510b6 Author: Bart Van Assche Date: Thu Apr 12 11:20:11 2018 -0600 mibII/at: Make ARP_Scan_Next() accept four arguments on all platforms Instead of using #ifdefs to discriminate between platforms on which it is possible to query the interface index and platforms on which this is not possible, make ARP_Scan_Next() set ifIndex to zero if the interface index cannot be queried and make var_atEntry translate that value into 1. commit b2ff05cb4cc7b382019de5194108f89ca5979a39 Author: Bart Van Assche Date: Sat Apr 21 19:16:07 2018 -0700 c tests: Ensure that linking succeeds if the openssl path has been specified explicitly commit e49295383003b1522b83df760c5384f1b8803a28 Author: Bart Van Assche Date: Fri Apr 20 20:56:21 2018 -0700 testing/fulltests/default/T023snmpv3getMD5AES_simple: Skip if the openssl aes.h header file is not available commit 3054ac2102eb29f3b5956abe98f3abd17bfa6f84 Author: Bart Van Assche Date: Thu Apr 19 19:03:08 2018 -0700 testing/fulltests/transports/T361tlstcp_simple: Skip if TLS-TCP is disabled Fixes: 5d8a5efc1d59 ("tests for minimally testing all the transports") commit 7babf86b438725c6c9fae7089a90cd94799c49cf Author: Bart Van Assche Date: Sat Apr 21 18:43:31 2018 -0700 python: Ensure that linking succeeds if the openssl path has been specified explicitly commit ed29326f1b56c8554e0fec79cb743622c9453426 Author: Bart Van Assche Date: Fri Apr 20 09:55:48 2018 -0700 Darwin >= 15: Avoid ___CFConstantStringClassReference symbol not found failures See also https://sourceforge.net/p/net-snmp/bugs/2850/. commit 945c7cd57cbbca6061cb632705de441ae7b98fd9 Author: Bart Van Assche Date: Thu Apr 19 22:16:54 2018 -0700 win32/Configure: Improve robustness commit 3492c22bb6b730dec0941522199eeca7524ce6ed Author: Bart Van Assche Date: Sat Mar 31 19:20:41 2018 -0700 Avoid that test T070com2sec_simple fails due to DNS filtering commit 52795c2e0801913a0b91c250e65ca6cd41e16c77 Author: Bart Van Assche Date: Sat Apr 14 15:46:14 2018 -0700 perl/OID/OID.xs: Fix a compiler warning Avoid that clang reports the following compiler warning: OID.xs:366:38: warning: passing 'u_char *' (aka 'unsigned char *') to parameter of type 'char *' converts between pointers to integer types with different sign [-Wpointer-sign] __snprint_value (buf, buf_len, &vbdata, indexnode, ^~~ commit bd176f4785cd7a47154502ecea2555bdbb91c877 Author: Bart Van Assche Date: Sat Apr 14 15:14:21 2018 -0700 configure: Document that --with-perl-modules=verbose is helpful while debugging Makefile.PL files commit e93f0c54f025d2a31ff100259fce5f484eee46ac Author: Bart Van Assche Date: Sat Apr 14 13:07:30 2018 -0700 testing/fulltests/unit-tests/T003copy_nword_clib: Fix Darwin compiler warnings commit 2eff423b8b4269498ce2525a1b180890934413be Author: Bart Van Assche Date: Sat Apr 14 12:53:11 2018 -0700 Add support for Darwin 15, 16 and 17 commit 13fe7de92a7551817dfbf474e845e88a59a3c884 Author: Bart Van Assche Date: Sat Apr 14 12:49:48 2018 -0700 MIB-II: Restore the declaration of TCP_Count_Connections() Fixes: 81b65f4d23a9 ("Move declarations of global functions and variables from .c to .h") commit 36f5813fb5bd9d12cdd015d35ec80defed42838e Author: Bart Van Assche Date: Sat Apr 14 09:41:31 2018 -0700 Windows, MIB-II, system: Read Windows version from registry commit 6d86c72614936a0fb3b56619965c96a5b120d89c Author: Bart Van Assche Date: Sat Apr 14 08:43:26 2018 -0700 Cygwin, swrun: Avoid using GetVersionEx() commit 8c8d5638413a90e423083c793b5d6be49a591281 Author: Bart Van Assche Date: Sat Apr 14 11:17:43 2018 -0700 Win32, MSVC batch build: Embed OpenSSL library path in Makefiles instead of appending it to %LIB% This makes it possible to rebuild Net-SNMP by running 'nmake' after having edited one or more source files without having to modify %LIB%. commit d8be6fc26e1006a7e03d922a04611d4e2cb69c44 Author: Bart Van Assche Date: Sat Apr 14 04:35:19 2018 -0700 Win32: Enable cross-compilation in build.pl Allow e.g. 64-bit binaries to be built on a 32-bit system if Perl modules are not enabled. commit 5bd95fe6f916d043ac7c5411510dfb8a669c9ab6 Author: Bart Van Assche Date: Fri Apr 13 21:24:31 2018 -0700 Windows: Avoid casting a pointer to an integer type with a different size This patch fixes bug https://sourceforge.net/p/net-snmp/bugs/2848/. commit 38fb9890a1e27bec336a09e20e725534d8939168 Author: Bill Fenner Date: Wed Apr 11 07:50:48 2018 -0700 make python client build with --enable-read-only commit 37b948c3d6451c6f31e066d52ef9a528985ea7c7 Author: Bill Fenner Date: Wed Apr 11 13:56:36 2018 +0000 CHANGES: snmpd: BUG: 2846: fix agent compile when both --enable-read-only and --disable-set-support are given. commit d8939faf1e724ff042dd4af83cac360a15883825 Author: Bill Fenner Date: Wed Apr 11 13:53:29 2018 +0000 CHANGES: snmpd: BUG: 2845: fix compilation error with NETSNMP_NO_WRITE_SUPPORT commit 4d1d375df29aa52b8c01893d687dfdd55204eb04 Author: Bill Fenner Date: Tue Apr 10 20:31:38 2018 +0000 CHANGES: snmpd: BUG: 2810: from "Minzhuan Gong": fix compile with --enable-read-only commit eca6ad6d8ff488839187f05a62dc2ec053c53b2b Author: Bill Fenner Date: Sun Apr 8 13:53:25 2018 +0000 Don't check the sign of a 0-length int64 When there are no data bytes, don't try to check a nonexistent byte for the sign. Also, include all of the data bytes for unsigned-64 and signed-64 in the dumpx_recv tracing. commit e59591c5111c17b2561816b04ac3632661df19cd Author: Bill Fenner Date: Tue Apr 3 14:20:12 2018 -0700 snmplib: asn1: audit length checks 1. propagate error from asn_parse_length in asn_check_packet 2. Audit calls to _asn_short_err, make sure that the second arg is the length being checked against, and the third arg is the length needed. 3. Make sure that we have the two bytes needed for opaque types before testing them. 4. For opaque types, update the length to reflect the inner opaque type before checking that we have enough data. commit e5ad10de8e175e443351be3e14e87067ff9bded8 Author: Keith Mendoza Date: Wed Mar 21 21:33:27 2018 -0700 Quote provided encryption key in createUser line Fixes bug #2812 commit 20c63da4317d0c6f41be1e8826a91e3e8e7aa72f Author: Bill Fenner Date: Tue Apr 3 14:20:12 2018 -0700 snmplib: asn1: audit length checks 1. propagate error from asn_parse_length in asn_check_packet 2. Audit calls to _asn_short_err, make sure that the second arg is the length being checked against, and the third arg is the length needed. 3. Make sure that we have the two bytes needed for opaque types before testing them. 4. For opaque types, update the length to reflect the inner opaque type before checking that we have enough data. commit 37c11615de3cfb2c934ccb334a8ccb8bbde85d89 Author: Bill Fenner Date: Sun Apr 1 16:58:51 2018 +0000 CHANGES: agentx: from "Google AutoFuzz project": account for the nul character we will add to the string. commit 95e59ff91b20fb82b22c373ef4bff2cb94271385 Author: Bill Fenner Date: Thu Mar 29 17:03:36 2018 -0700 CHANGES: agentx: from "Google Autofuzz project": additional agentx protocol parser bounds checking commit 883934016bd47181f32f031fe3c7d409d4c5fa82 Author: Magnus Fromreide Date: Sun Mar 25 23:50:17 2018 +0200 Coverity 266329: Free allocated resources in case of error commit c0d0bc4c37e60d93ca47e0ee0c29a431c59de712 Author: Bart Van Assche Date: Sat Mar 24 11:46:28 2018 -0700 snmplib/keytools: Ensure that keylen is initialized for all error paths commit d08ffd7d0c61f114e717eadaa1cf696735dcca6b Author: Bart Van Assche Date: Sat Mar 24 12:36:54 2018 -0700 snmplib, vacm: Remove dead code Since it is guaranteed that accessEntry == NULL after "goto bail" has been executed, remove the code that depends on accessEntry != NULL. This patch fixes Coverity ID 144350. commit d3920fcedf5c1bcaee30d5308943e78b4a429eb0 Author: Bart Van Assche Date: Sat Mar 24 12:34:11 2018 -0700 snmplib, snmpusm: Remove a superfluous check Checking whether or not a pointer is not NULL after it has been dereferenced is not useful. Hence remove the check. This patch fixes Coverity ID 144385. commit f138736bedc82008566063119d301bad07e3e5f8 Author: Bart Van Assche Date: Sat Mar 24 12:32:35 2018 -0700 snmplib, snmp_api: Remove a superfluous check Checking whether a pointer is not NULL after it has been dereferenced is not useful. Hence remove the != NULL check. This patch fixes Coverity ID 144387. commit fb763ef6f390ac8dec4d7c0c0160f648464d587d Author: Bart Van Assche Date: Sun Mar 25 08:22:18 2018 -0700 Revert "perl: Unbreak Perl module linking" The Perl module build problems were caused by a concurrent build (make -j) and not by a problem in any of the Makefile.PL files. Hence revert commit 347d4cf207b8. commit 0545bc80654a081aed5969f425dc2f2b45f3cccf Author: Bill Fenner Date: Sun Mar 25 15:08:27 2018 +0000 CHANGES: snmplib: asn1: from "Google Autofuzz project": propagate error from asn_parse_length commit 52ccd5b24fbaed5a75156b3da07b83fa4b80e2e2 Author: Bart Van Assche Date: Sat Mar 24 09:54:33 2018 -0700 apps/sshtosnmp: Initialize read_set This patch fixes Coverity ID 266307. commit 6407a3ec77c959e789ccee2eaf58d117dd27cdb6 Author: Bart Van Assche Date: Sat Mar 24 09:52:50 2018 -0700 apps/sshtosnmp: Avoid overflowing an output buffer This patch fixes Coverity ID 266309. commit 1744c0279d8ebab010192af07bf7a4c6cecc42dc Author: Bart Van Assche Date: Sat Mar 24 15:30:28 2018 -0700 snmpd, DISMAN MIB: Avoid dereferencing a NULL pointer This patch fixes Coverity ID 85560. commit 844c37e7207b902af1097c6baac0a22bf6d7c039 Author: Bart Van Assche Date: Sat Mar 24 15:28:18 2018 -0700 snmpd, dlmod: Avoid dereferencing a NULL pointer This patch fixes Coverity ID 144354. commit bb2fe7fea965610449a939c6cd1f4788181d1ac8 Author: Bart Van Assche Date: Sat Mar 24 15:25:18 2018 -0700 snmpd, pass_persist: Avoid dereferencing a NULL pointer This patch fixes Coverity ID 266321. commit 0c7ea894ff832d928c1427ae6e9ec1fb9b7abc0b Author: Bart Van Assche Date: Sat Mar 24 15:19:26 2018 -0700 snmpd, mib-II: Initialize dst.sin_port and gateway.sin_port This patch fixes Coverity IDs 85686 and 85660. commit fb882c7c514bffb7870381a7f0343a447dfdf66d Author: Bart Van Assche Date: Sat Mar 24 15:16:53 2018 -0700 snmpd, ip-forward-mib: Initialize dst.sin_port and gateway.sin_port This patch fixes Coverity IDs 85700 and 85690. commit 07416f5e22807867e035bee0bfb2b5c96e78a13e Author: Bart Van Assche Date: Sat Mar 24 15:14:42 2018 -0700 snmpd, MIB-II: Initialize pcb.inp_next This patch fixes Coverity ID 85702. commit 731e4f0dfcb0cb9e3f750c109b1cb6efe2169604 Author: Bart Van Assche Date: Sat Mar 24 11:50:31 2018 -0700 snmpd, tsltm-mib: Only release an iterator if it has been initialized first commit 1457675095363781668241653424b92c5aba28d8 Author: Bart Van Assche Date: Sat Mar 24 10:43:24 2018 -0700 snmpd, MIB-II: Check strchr() return value This patch fixes Coverity ID 266305. commit bf690d7732724a452dd9eb1f6dd60e92ba2fdc1d Author: Bart Van Assche Date: Sat Mar 24 10:36:18 2018 -0700 snmpd, agent/mibgroup/hardware/cpu/cpu_linux: Check strchr() return value This patch fixes Coverity ID 266326. commit 7a148f07a6e3b3ec8cc55880eb82ff206b5c1d37 Author: Bart Van Assche Date: Sat Mar 24 10:33:25 2018 -0700 snmpd, ucd-snmp/pass_persist: Avoid passing NULL as the second argument to write_persist_pipe() This patch fixes Coverity ID 266334. commit 29e4e4fe2468834d2148881a97185982a636674c Author: Bart Van Assche Date: Sat Mar 24 10:30:51 2018 -0700 snmpd, disman/ping/pingCtlTable: Initialize mhdr.msg_flags This patch fixes Coverity ID 85579. commit c276d4d8238248558c71ca975b2399db72c3cb1c Author: Bart Van Assche Date: Sat Mar 24 10:28:38 2018 -0700 snmpd, ip-forward-mib: Initialize dst.sin_port and mask.sin_port This patch fixes Coverity IDs 85592 and 85580. commit c1693ed45af0d0855b2025c30c042fa6ace55689 Author: Bart Van Assche Date: Sat Mar 24 12:21:39 2018 -0700 snmplib/keytools: Avoid dereferencing a NULL pointer This patch fixes Coverity ID 266324. commit ef889d0a284b00c5a1c6e6c9175e2b765e586bc2 Author: Bart Van Assche Date: Sat Mar 24 12:18:19 2018 -0700 snmplib, SSH transport: Avoid dereferencing a NULL pointer This patch fixes Coverity ID 266333. commit bfd9081e7a49e5d873a9be9da6a5c54ae5da5401 Author: Bart Van Assche Date: Sat Mar 24 10:39:43 2018 -0700 snmplib, SSH transport: Avoid calling close(-1) This patch fixes Coverity ID 266314. commit 307b8fa96bab9609c8e697e5f52abdd57fb6b167 Author: Bart Van Assche Date: Sat Mar 24 09:47:45 2018 -0700 snmplib, SSH transport: Pass a valid socket descriptor to setsockopt() Check the accept() return value before calling setsockopt() instead of after having called setsockopt(). This patch fixes Coverity ID 266325. commit 732df276f0905bdb67aafcd812de1c2b51a0cc41 Author: Bart Van Assche Date: Sat Mar 24 12:40:30 2018 -0700 snmplib, SSH transport: Avoid overflowing the output buffer This patch fixes Coverity ID 266310. commit f57c787584ff21f59e0beec0918c8a23aeb3031a Author: Bart Van Assche Date: Sat Mar 24 10:50:58 2018 -0700 snmplib, _daemon_prep(): Suppress a Coverity complaint Avoid that Coverity complaint about not closing fd being a resource leak. This patch does not change any functionality but fixes Coverity ID 86657. commit af3fc499f6007f56623f3b1b046512e985505a1e Author: Bart Van Assche Date: Sat Mar 24 10:21:05 2018 -0700 snmplib: Initialize tm_isdst if available This patch fixes Coverity ID 144417. commit 878fe301a9a5e548dab22c2d08e52039c6838216 Author: Bart Van Assche Date: Sat Mar 24 15:12:28 2018 -0700 snmplib, ASN parsing: Avoid reading uninitialized data if the output buffer is small This patch fixes Coverity ID 85714. commit 70c52531fc2926bd9d1a9d4e00544c2c392d3d65 Author: Bill Fenner Date: Sat Mar 24 15:31:27 2018 +0000 CHANGES: snmplib: asn1: BUG: 2828: from "Google Autofuzz project": fix off-by-one heap access for opaque types (and an adjacent bug that was not in 5.4, noticed by code inspection) commit aee85c048928bb67f5b1e84b603a5428b5f7f9e3 Author: Bill Fenner Date: Sat Mar 24 15:27:57 2018 +0000 CHANGES: snmplib: asn1: BUG: 2828: from "Google Autofuzz project": fix off-by-one heap access for opaque types commit 347d4cf207b834744fc9215f7e4423530c67653f Author: Bart Van Assche Date: Fri Mar 23 21:45:55 2018 -0700 perl: Unbreak Perl module linking For one or another reason ExtUtils::MakeMaker leaves out -L${prefix}/lib -lnetsnmp from $Params{LIBS}. Add -lnetsnmp back such that Perl module linking works again. commit 0adc62ebbbd5192bbb97b43e49a6604b9ff7c217 Author: Bart Van Assche Date: Thu Mar 22 21:53:23 2018 -0700 perl/default_store/test.pl: Enable 'strict' and 'warnings' commit a7dfe31ea120ea68f4304170cadae3a2adcde99a Author: Bart Van Assche Date: Fri Mar 23 20:20:12 2018 -0700 perl/SNMP/Makefile.PL: Suppress a complaint about a concatenation Avoid that Perl complains about $ENV{'NET-SNMP-PATH'} not being defined on Unix systems by only evaluating it on Windows systems. commit e0027a2c681369d99434f09bc380dfbd1c3358ec Author: Bart Van Assche Date: Fri Mar 23 20:17:30 2018 -0700 perl/agent/Support/Makefile.PL: Fix library paths commit b7149cda92c545ab1974d678ab6d7efe0628276e Author: Bart Van Assche Date: Fri Mar 23 20:08:28 2018 -0700 perl Makefiles: Make library paths absolute commit ba6e19f8ed23052939f90d93222e855778c850d1 Author: Bart Van Assche Date: Fri Mar 23 20:43:52 2018 -0700 perl: Convert Makefile.subs.pl into a Perl package This patch does not change the generated makefiles. commit bde2b845786e07d825cc4629e872f1e6d05f985b Author: Bart Van Assche Date: Fri Mar 23 18:56:59 2018 -0700 Makefile.in: Make it easy to enable Carp::Always for generating Perl makefiles Adding -MCarp::Always to the perl command line produces more detailed diagnostics during generation of Perl Makefiles. commit 532c8c2b2d34645a2fc730815521b451a178f08b Author: Bart Van Assche Date: Thu Mar 22 22:42:31 2018 -0700 perl/.../Makefile.PL: Enable 'use strict' and 'use warnings' commit eacdabd16ad2fad1569a6ee982053feb94514869 Author: Bill Fenner Date: Fri Mar 23 17:03:36 2018 +0000 snmplib: report the underlying error if set by asn1 library commit c5d9cecda251ea1f4638f88d5506b1f1743d87c3 Author: Bart Van Assche Date: Tue Mar 20 21:08:15 2018 -0700 snmplib: Avoid that freeing the snmpv3_parse_arg() result can trigger a crash Fixes: 673f81051d58 ("snmplib, SNMPv3: Fix two memory leaks in netsnmp_parse_args()") commit e1b6ce470a6cef6c7fd70607c077ebed18cc1dc0 Author: Bart Van Assche Date: Thu Mar 22 00:20:52 2018 +0100 snmplib, agent: Suppress warnings about not using the return value of asprintf() This patch does not change any functionality. commit c0a4b11b9b7ab10d195ea79c641eda57628870d8 Author: Bill Fenner Date: Wed Mar 21 15:38:33 2018 +0000 NEWS: snmpd: com2sec and com2sec6 SOURCE values may deny sources as well as permit. commit f4ece692aa0372f30ca6dc2f8d39c8b49617b576 Author: Bart Van Assche Date: Sun Mar 18 21:14:25 2018 -0700 Win32, MSVC: Unbreak the non-SSL build commit 370e84aac13cab309ffaebc5ffb7a06ea5943165 Author: Bart Van Assche Date: Sun Mar 11 16:55:06 2018 -0700 win32/dist/build-binary: Pass build options as arguments commit f148b5f46541e3ec3c33c977d7705f14e736e7e1 Author: Bart Van Assche Date: Sun Mar 11 16:58:51 2018 -0700 win32/dist/build-binary: Build Net-SNMP without Perl modules Building Net-SNMP with Perl modules was possible when ActivePerl distributed Perl binaries with Visual Studio. Since they switched to gcc it's no longer possible to link the Net-SNMP code (built with MSVC) with the ActivePerl Perl libraries (built with gcc). commit 46d8156b7edee134d3c8b000b99791b4147ef4b5 Author: Bart Van Assche Date: Sun Mar 11 16:56:46 2018 -0700 win32/dist/build-binary: Enable 'use warnings' commit 82b4276a7c6a67e79657e4b78b35d7e31ddfeafb Author: Bart Van Assche Date: Sun Mar 18 09:42:48 2018 -0700 Win32: Add support for the DTLS-UDP and TLS-TCP transports commit 3792bc46a04cfd7163129355c450caef63dfd4fd Author: Bart Van Assche Date: Sun Mar 18 17:08:37 2018 -0700 Win32, MSVC: Pass OpenSSL include path as a compiler option commit 2ef90da390ff2546e8b9b8a8de94af678d1b12de Author: Bart Van Assche Date: Sun Mar 18 08:39:23 2018 -0700 Win32, MSVC: Reduce redundancy in the build system commit f9b3fed793a9b336161236c6c2a5bbcc32018445 Author: Bart Van Assche Date: Sun Mar 18 08:56:48 2018 -0700 win32/Configure: Avoid that perl warns about masked declarations commit 33e7c68621b399e406679cd74db2fbf563d1c701 Author: Bart Van Assche Date: Sun Mar 18 10:55:17 2018 -0700 snmplib: Various MSVC build fixes commit 376f589e7513d84e6e46439aa3ae7f21bca42c8f Author: Bart Van Assche Date: Sun Mar 18 17:49:37 2018 -0700 snmplib/transports/snmpDTLSUDPDomain, MSVC: Fix two recently introduced compiler warnings commit 7ad11d55e62ecee98b7ae362880a4b583288071d Author: Bart Van Assche Date: Sun Mar 18 09:30:55 2018 -0700 snmplib/transports/snmpUDPBaseDomain, MSVC: Fix two recently introduced compiler warnings commit a8e11b3204c8e37745a4a5139b1dcbf3aeef5aa7 Author: Bart Van Assche Date: Sat Mar 17 14:42:53 2018 -0700 win32/dist/installer/net-snmp.nsi: Use WinVer.nsh to determine Windows version Obtaining the Windows version from the registry doesn't work on Windows 10. Although I have no idea why, use WinVer.nsh to determine the Windows version. commit ac72c513d321f13284a02f1a9c337909ad0af3ef Author: Bart Van Assche Date: Sat Mar 17 14:59:45 2018 -0700 win32/dist/installer/net-snmp.nsi: Disable installation of Perl modules commit 96047c5e23f3aef95663710b16b6ac8a50a1f518 Author: Bart Van Assche Date: Sat Mar 17 20:08:53 2018 -0700 win32/dist/installer/net-snmp.nsi: Comment out an obsolete include None of the macros defined in SetEnVar.nsi are used. Hence do no longer include that file. See also commit 8a572b4e08ff ("Add netsnmp_getenv() which is a wrapper for getenv() to add basic Windows registry support.") commit 0c66f45714629331cf3a9b72a6eabb8315de9e72 Author: Bart Van Assche Date: Sat Mar 17 20:46:41 2018 -0700 win32/Configure: Enable 'use warnings' commit b841dc9c53d7e96daaf962194ce35e61ef241afc Author: Bart Van Assche Date: Sat Mar 17 20:47:01 2018 -0700 win32/build.pl: Suppress a Perl warning commit ff46360780f835d7bf0dcb076ebf47c4ac0f1605 Author: Bart Van Assche Date: Sun Mar 11 16:55:06 2018 -0700 win32/dist/build-binary: Pass build options as arguments commit 0dcbe946bbdfc1c048ca448595334ae1a4cb67b8 Author: Bart Van Assche Date: Sun Mar 11 16:58:51 2018 -0700 win32/dist/build-binary: Build Net-SNMP without Perl modules Building Net-SNMP with Perl modules was possible when ActivePerl distributed Perl binaries with Visual Studio. Since they switched to gcc it's no longer possible to link the Net-SNMP code (built with MSVC) with the ActivePerl Perl libraries (built with gcc). commit 28180252de086242ae8e70203960cc5f1f0e4a7f Author: Bart Van Assche Date: Sun Mar 11 16:56:46 2018 -0700 win32/dist/build-binary: Enable 'use warnings' commit f0b5ab271d0561caf8eb0c2baeff313341a75eb7 Author: Bart Van Assche Date: Sun Mar 11 15:13:13 2018 -0700 README.win32: Document how to build the installer commit 4a3d9af910dd3aef09776d0c75b0a04f0851c054 Author: Bart Van Assche Date: Sat Mar 10 21:25:24 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Make it possible to send traps over DTLS-UDP commit 0eb5f25501e3426e588a4705f480ed21be042736 Author: Bart Van Assche Date: Sat Mar 10 21:07:59 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Add more debug tracing code commit 9040c95258fb9f9c3534df65d519b6c7133c5d30 Author: Bart Van Assche Date: Sat Mar 10 20:25:37 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Reduce stack usage Allocate the buffer for data that will be sent over the network dynamically instead of on the stack. commit cdf1bf431d894149ddbb38ddb9849d21a7de3e28 Author: Bart Van Assche Date: Sat Mar 10 19:57:53 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Remove superfluous checks Change if (e) return; if (!e && f) ... into if (e) return; if (f) ... commit 6861c1b9f69d66dee91d2e5d4eb8de204c8e0b7b Author: Bart Van Assche Date: Sat Mar 10 19:35:25 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Coding style fixes Make the coding style consistent with the rest of the code base. commit eac9744563669871c960348a1cf6a77e2b7c9772 Author: Bart Van Assche Date: Sat Mar 10 19:18:32 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Fix spelling in source code comments commit 2495e4bdb33ce5d1432b5d66d11a692cbd58a10a Author: Bart Van Assche Date: Sat Mar 10 19:13:56 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Pass static pointers to SSL_get_ex_new_index() The pointer that is passed as the second argument to SSL_get_ex_new_index() is stored by that function in a global data structure. Make sure that the pointers that are passed to SSL_get_ex_new_index() remain valid after netsnmp_dtlsudp_ctor() has finished. commit 637931131baac12d6bdd78df811fec4864b7b716 Author: Bart Van Assche Date: Sat Mar 10 10:35:05 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Remove the _peer_union data structure Since _peer_union and netsnmp_sockaddr_storage are exactly the same unions, remove the former. This patch does not change any functionality. commit df4b85289ee3f9de0d1edb3603d64096ed6b7eda Author: Bart Van Assche Date: Sat Mar 10 10:10:04 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Remove superfluous casts This patch does not change any functionality. commit f3c1d67b714eedbae4141feb9d6984fab70581bc Author: Bart Van Assche Date: Fri Mar 9 21:33:39 2018 -0800 snmplib/transports/snmpDTLSUDPDomain: Remove two (void **) casts Change the data type of two local variables named 'sa' into void * such that two (void **) casts can be removed. This patch does not change any functionality. commit ed5bbbcd315f4425ac7c85a7fe32bb3a5afd2241 Author: Bart Van Assche Date: Sat Mar 10 09:52:09 2018 -0800 snmplib/transports/snmpCallbackDomain: Make netsnmp_callback_send() easier to read This patch does not change any functionality. commit 56889633204839e4b0d57b5b4bb973d590684ed4 Author: Bart Van Assche Date: Sat Mar 10 09:49:09 2018 -0800 snmplib/transports/snmpCallbackDomain: Make find_transport_from_callback_num() easier to read This patch does not change any functionality. commit 9a088c7951a462ca85ae5f5d3d6f389436580522 Author: Bart Van Assche Date: Sat Mar 10 09:48:28 2018 -0800 snmplib/transports/snmpCallbackDomain: Make find_transport_from_callback_num() reentrant commit 506f60d6b61c30a8a0dfc8cc207365f71e326c7f Author: Bart Van Assche Date: Sat Mar 10 09:45:05 2018 -0800 snmplib/transports/snmpCallbackDomain: Simplify netsnmp_callback_fmtaddr() This patch does not change any functionality. commit 0907750de83418364f40d94424e32b6292fa2a2c Author: Bart Van Assche Date: Sat Mar 10 09:43:23 2018 -0800 snmplib/transports/snmpCallbackDomain: Remove superfluous casts This patch does not change any functionality. commit a058952120a69504b4be84d3518161c4700cbc5b Author: Bart Van Assche Date: Sat Mar 10 09:41:43 2018 -0800 snmplib/transports/snmpCallbackDomain: Remove a local variable This patch does not change any functionality. commit ac12184da7590af7cd6ae93e59801888080497ea Author: Wes Hardaker Date: Fri Mar 9 15:47:34 2018 -0800 CHANGES: fix bug #2832 for building new checkbandwidth script commit 114b600432980529087b25c6e9aeb068e17f2837 Author: Bart Van Assche Date: Tue Mar 6 19:20:26 2018 -0800 snmplib: Suppress recently introduced Cygwin build warnings commit c9e11fd8e063dca694cf3f5c7a715a726f27bdc7 Author: Bart Van Assche Date: Tue Mar 6 19:20:04 2018 -0800 testing/fulltests: Suppress Cygwin warnings Avoid that warnings appear with Cygwin about redeclaring optind etc. commit 2e5222c4d7512c58b35be301e2b8ff8df6c562c3 Author: Bart Van Assche Date: Mon Mar 5 21:59:42 2018 -0800 snmplib, MIBs: Use NETSNMP_PRIz where required commit 7b1c542f0c7699fe242937a633c79063845a98c1 Author: Bart Van Assche Date: Mon Mar 5 19:53:18 2018 -0800 Win32, MSVC: Fix recently introduced DLL build failures commit 91037042136de9ec07bd337e41aeb00a60ed82ee Author: Bart Van Assche Date: Mon Mar 5 21:41:34 2018 -0800 Win32, MinGW: Fix the build against the latest MinGW Windows headers commit 6533b51a77a18b1e81cee71d7ee5a5b8596aadee Author: Bart Van Assche Date: Mon Mar 5 19:20:05 2018 -0800 snmplib, TLS: Avoid that names without dot trigger a segmentation fault commit 8e1a168025edc4f035f3c35f8022b1df697380fe Author: Bart Van Assche Date: Mon Mar 5 16:51:02 2018 -0800 snmpd: Make the agentxperms keyword work again Since there is code in agent/mibgroup/agentx/master.c that assumes that t->local points to the path of the Unix socket, make t->local again point at the Unix socket path for the Unix transport. This was reported by Sam Tannous . See also https://sourceforge.net/p/net-snmp/bugs/2830/. This partially reverts commit 3bd8dc8b2d90bba775ff1a1fa2f4197fb20b180b. commit ae0caf620e06e13f85079642aea2c2368ae24d95 Author: Bill Fenner Date: Mon Mar 5 14:10:46 2018 -0800 Unbreak minimal agent by declaring our feature dependency on sc_get_proper_priv_length() ---------------------------------------------------------------------- Changes: V5.8.pre1 -> V5.8.pre2 commit 20ae34cc421fdd61ce973e4fd3c4ac9b0a144514 Author: Robert Story Date: Mon Mar 5 11:57:19 2018 -0500 Version number update: 5.8.pre2 commit 4ecad5c95cccca9012ea8d337836835022c202b4 Author: Robert Story Date: Mon Mar 5 11:56:09 2018 -0500 regenerate configure commit 59877eafa2ef9365a73f45ddef1551c88ddc55b4 Author: Robert Story Date: Mon Mar 5 11:42:28 2018 -0500 Revert "Make snmptrap work for DTLS-UDP" SNMPv3 traps use local engineID so no probe is needed. More investigation needed into why DTLS-UDP traps tests are failing. This reverts commit ace478cebbe620c8fa43161858f3db8f79fdafba. commit 95c2a160231c6806401fcf0059661dc667406aa0 Author: Robert Story Date: Fri Feb 16 11:45:54 2018 -0500 fix ceiling count for extend_kul commit 8bd649d115b7a237da3edd84be95a1af19d41b34 Author: Robert Story Date: Fri Feb 16 11:45:17 2018 -0500 BUG: fix usm keychanges for new algorithms and longer keylengths commit 8051b8372dfd7143dd571aeccaebc648d53a5afc Author: Robert Story Date: Fri Feb 16 11:34:04 2018 -0500 add a bunch of debug during usm/key processing commit 9bee3387ed28e33e558072ecdbce5c5712c6fe3a Author: Robert Story Date: Fri Feb 16 10:51:33 2018 -0500 fix some memory leaks in usm processing commit c89aabfee0fe6a0dca691c588f8ecd6d803965d7 Author: Robert Story Date: Fri Feb 16 10:49:10 2018 -0500 match exact string length in usm_lookup_alg_type commit 1620dea72ae008c741920c329bd84032016d9237 Author: Robert Story Date: Fri Feb 16 10:48:09 2018 -0500 make usm_extend_user_kul avaialable to other files commit 720a47eeaade1052605a644fcbb8f6a4b90faaab Author: Robert Story Date: Fri Feb 16 10:44:54 2018 -0500 remove redundant cisco2 AES types commit 7497e2eade8aafcf53c48e1b29800b3d26dcb1b5 Author: Robert Story Date: Fri Feb 16 10:42:01 2018 -0500 check if libm is needed for ceil function commit 13183a8054f3dd9617023065b26b4c487d4799c2 Author: Bart Van Assche Date: Sun Mar 4 21:23:57 2018 -0800 snmplib: Fix MinGW build Fix recently introduced MinGW build failures and warnings. commit 35b1a5b8869a83666fb7481564e91b2229bccb05 Author: Bart Van Assche Date: Sun Mar 4 20:10:14 2018 -0800 testing/fulltests/tls/STlsUsers: Fix this test commit f04ecd20fce2e6b9023e8f1f455fe576c102d038 Author: Bart Van Assche Date: Sun Mar 4 19:32:14 2018 -0800 testing/fulltests/tls/STlsServer: Fix a comment commit 2c682f6cbce8cc857acdef4dc145ae3ad5f98304 Author: Bart Van Assche Date: Sun Mar 4 19:58:08 2018 -0800 snmplib: Refuse certificates for which a trusted chain was not found the trust store This patch fixes the noTrustCACert STlsServer test. Fixes: 0598b77e1c3a ("CHANGES: snmplib: add more openssl error cases where we check for local cert") commit d9471b0227d484ac69804e58d4b955270267bb9c Author: Bart Van Assche Date: Sun Mar 4 18:01:38 2018 -0800 snmplib, cert_util: Fix spelling in a soure code comment commit b1bf5c9d1883b2fe3365cc21844174f308cc90e7 Author: Bart Van Assche Date: Sun Mar 4 18:53:41 2018 -0800 snmplib, UDP transport: Remove a cast commit 8915e14d1674d0675d56341fcb21c407e0945e50 Author: Bart Van Assche Date: Sun Mar 4 18:52:27 2018 -0800 snmplib, UDP transport: Fix spelling in soure code comments commit 1af94a8e76d5aee9a54713054e67fb2d82271f0a Author: Bart Van Assche Date: Sun Mar 4 18:42:54 2018 -0800 snmplib, TLS-TCP transport: Fix spelling in a log message commit e2f78d27f2217a2aab4d042eb7ce26f52566fb74 Author: Bart Van Assche Date: Sun Mar 4 19:48:21 2018 -0800 snmplib, TLS transport: Fix spelling in a source code comment commit ce92b97d2e0e237844df5dc454cc5315aff7f1a7 Author: Bart Van Assche Date: Sun Mar 4 18:17:00 2018 -0800 snmplib, TCP transport: Set 'farendlen' correctly commit 78af047973afc8d8102e9f92fd5686005941751c Author: Bart Van Assche Date: Mon Feb 26 22:28:03 2018 -0800 testing/fulltests/snmpv3/T010scapitest_capp.c: Initialize loop variable 'index' Initialize 'index' before starting the loop. Additionally, fix the indentation of the code in test_docrypt(). commit ace478cebbe620c8fa43161858f3db8f79fdafba Author: Bart Van Assche Date: Sun Feb 25 19:31:10 2018 -0800 Make snmptrap work for DTLS-UDP Enable engineID probing for SNMP traps sent over the DTLS-UDP transport. This is necessary to make snmptrap work over DTLS-UDP and also to make the unit tests pass that send traps over DTLS-UDP. commit 528b98358c0774edbbbae529edf89cbc7358bcf2 Author: Bart Van Assche Date: Sun Feb 25 09:48:13 2018 -0800 snmplib/transports/snmpIPv6BaseDomain.c: Fix netsnmp_ipv6_fmtaddr() Add support for decoding t->data if that pointer points at a netsnmp_indexed_addr_pair structure. commit e3fd8c38503f1ce12886ed0c69de7b3e6dbf42b4 Author: Bart Van Assche Date: Sun Feb 25 09:48:11 2018 -0800 snmplib/transports/snmpIPv4BaseDomain.c: Make netsnmp_ipv4_fmtaddr() more robust commit 8690931673c6643802d7167b12cc52b53e958a32 Author: Bart Van Assche Date: Sun Feb 25 09:34:47 2018 -0800 snmplib/transports/snmpIPv4BaseDomain.c: Remove dead code Since &(ptr->member) is never NULL, remove the code that depends on such an expression evaluating to NULL. commit 17d6eafd09d7a206b280d4ff7fed3da427b4ce68 Author: Bart Van Assche Date: Sat Feb 24 16:04:07 2018 -0800 testing/fulltests/tls/STlsAgentTrap: Fix this test by adding -v3 to the snmpset command line commit 6e8fb30e9c44377c98e04db990c80e42e4b4c1d8 Author: Bart Van Assche Date: Sat Feb 24 15:34:03 2018 -0800 testing/fulltests/tls/STlsUsers: Fix this test commit 948340a2d0ba8a2855b4e8db91a9eb04d9418118 Author: Bart Van Assche Date: Sat Feb 24 15:53:05 2018 -0800 agent/mibgroup/examples/example.c: Fix spelling in a source code comment commit c49ebd86ac12f99b5b2e960746a7e9dbfc7bb0a4 Author: Bart Van Assche Date: Sat Feb 24 21:49:30 2018 -0800 snmplib/transports/snmp*TLS*Domain.c: Fix address formatting Next to data of type netsnmp_indexed_addr_pair, also decode netsnmp_tmStateReference and _netsnmpTLSBaseData. commit 0f72fa6cfdfcb09bbead02517a8af5f77c010561 Author: Bart Van Assche Date: Sat Feb 24 21:44:00 2018 -0800 snmplib/transports/snmpDTLSUDPDomain.c: Make _extract_addr_pair() easier to read Additionally, complain if the length of the opaque data is passed to _extract_addr_pair() is not supported. commit 4d6609d977734fe95aa4ebc2de270f521330a988 Author: Bart Van Assche Date: Sat Feb 24 21:12:52 2018 -0800 snmplib/transports/snmpDTLSUDPDomain.c: Fix spelling in a source code comment Change "packtes" into "packets". commit d33ad0bb66af037869c25391315e32578fee138b Author: Bart Van Assche Date: Wed Feb 14 20:32:22 2018 -0800 Fix the T200TlsIpv6_simple test Since the symbol NETSNMP_TRANSPORT_TLSIPV6_DOMAIN does not exist, remove it. And since having to edit /etc/hosts to be able to run a test is very annoying, switch from "localhost6" to "[::1]". commit 087f040b09a712664955980dd95853157dd618c8 Author: Bart Van Assche Date: Wed Feb 14 20:32:29 2018 -0800 testing/fulltests/tls: Reduce the time needed to run these tests Make the tests run faster by reducing the number of retries from 5 to 1. Reducing the number of retries is fine since no packets are lost when communicating at a low packet rate over the localhost interface. commit 7dbf67d1f693eee560f34a9beb41efc2acd220f2 Author: Bart Van Assche Date: Sat Feb 10 18:28:07 2018 -0800 testing/fulltests: Convert clientCert/serverCert keywords into localCert/peerCert Additionally, add -v3 to the app flags to avoid that snmpget and snmpset fail due to no community string having been specified. commit 3bd8dc8b2d90bba775ff1a1fa2f4197fb20b180b Author: Bart Van Assche Date: Sun Feb 11 10:43:41 2018 -0800 snmplib/transports: Avoid that the create_from_ostring methods truncate IPv6 addresses This patch not only simplifies the code but also fixes a bug in the DTLS-UDP and UDP-shared transports for IPv6, namely that IPv6 address truncation no longer occurs. The truncation was caused by the following code in the create_ostring implementations of these transports: memcpy(&addr6.sin6_addr.s6_addr, o, 4); commit 54a924bc9648fa665efc78aaede9d6c8e7092f9a Author: Bart Van Assche Date: Sun Feb 11 15:34:35 2018 -0800 snmplib/transports: Use asprintf() for formatting addresses This change simplifies the code. commit 651cbf9a4098c898192f855da80dc5f719d1fc2f Author: Bart Van Assche Date: Sun Feb 11 10:39:44 2018 -0800 snmplib/snmp_transport: Use netsnmp_memdup() instead of open-coding it commit 7e094ed17ef1eaf84b55fe18786b31b89fa69f36 Author: Bart Van Assche Date: Sat Feb 3 22:18:38 2018 -0800 snmplib/transports: Declare arguments that are not modified 'const' commit 20725d58ca76fe648c3ed3bf44d496a9a938ffde Author: Bart Van Assche Date: Sun Feb 11 09:53:44 2018 -0800 DTLSUDP transport: Check length of from address Avoid that copying 'opaque' into 'from' triggers a buffer overflow. commit 0ef2ffb2686f3cce65d702c87de9d158ef94ad67 Author: Bart Van Assche Date: Sun Feb 11 20:00:10 2018 -0800 testing/fulltests/snmpv3: Fix compiler warning and build issues commit 398f90a3e931e8cb7953a6fec6a309dd9bf5ba4d Author: Wes Hardaker Date: Fri Feb 2 13:50:48 2018 -0800 CHANGES: docs: Bug 2826: from Tomasz: fix utf-8 encoding commit 2a9f8d7793b54ba6fce804b05e4d37a4a237b1d2 Author: Wes Hardaker Date: Fri Feb 2 13:45:30 2018 -0800 CHANGES: python: BUG 2824: from: Tomasz: Fix python module make install commit 0ec7af6591adf600094c5ed98fa97a699dee4e8c Author: Wes Hardaker Date: Fri Feb 2 13:50:48 2018 -0800 CHANGES: docs: Bug 2826: from Tomasz: fix utf-8 encoding commit 4f481aa21a20a6c5ab463f9404e44ad9f247325e Author: Wes Hardaker Date: Fri Feb 2 13:45:30 2018 -0800 CHANGES: python: BUG 2824: from: Tomasz: Fix python module make install commit ba3e921f940494f42797456e60b594e6d5a0343c Author: Wes Hardaker Date: Mon Jan 29 10:50:49 2018 -0800 NEWS: apps: A new 'checkbandwidth' script to host min/max bandwidth commit 310afaf139fa95b3968e78c05609d90c36cd5ada Author: Bill Fenner Date: Thu Jan 25 14:23:04 2018 +0000 Update the NETSNMP_DISABLE_MD5 case for the removal of USM_LENGTH_OID_TRANSFORM commit f350c0ca404081060458b866da3cae48961013e1 Author: Bill Fenner Date: Tue Jan 23 20:00:50 2018 -0800 Allow access to new auth/priv algorithms from python bindings commit 19a25baefd16ecb67dea3710c2c5aacfb0e61610 Author: Bill Fenner Date: Tue Jan 23 19:57:17 2018 -0800 Initialize newKulLen in _kul_extend_blumenthal() commit 8ea9f6fccf1c11e72fbf6548b7eddab2167a220c Author: Bart Van Assche Date: Tue Jan 23 07:21:17 2018 -0800 configure: Add -Wlogical-op to the developer compiler flags commit 8611d5f1983be2cab28a6869eebbb7b1d512e310 Author: Bart Van Assche Date: Tue Jan 23 07:27:40 2018 -0800 snmplib/cert_util: Fix world read/writable test commit 418fbe78a0ca3ebb563695fbf58d51b8916a48d9 Author: Bart Van Assche Date: Sat Jan 13 10:44:34 2018 -0800 HOST-RESOURCES-MIB: Fix a compiler warning There are still systems that use int for time_t instead of long. commit de0ee141ce0eb4c062f739ea1ab5a1dd66cdef84 Author: Bart Van Assche Date: Sat Jan 13 09:57:34 2018 -0800 HOST-RESOURCES-MIB: Only call stime() if it is available stime() is an SVr4 function and is not available on e.g. AIX. commit a086aa45dcc328e4fe66cbb75f37cd6509b4637c Author: Bart Van Assche Date: Sat Jan 13 10:43:09 2018 -0800 snmplib: Unbreak the NetBSD build commit 708dd93377cd8219f18304436868588f50a42401 Author: Bart Van Assche Date: Sat Jan 13 09:54:38 2018 -0800 configure: Improve compiler flag detection support Avoid that numerous "warning: unsupported compiler flag ..." messages appear in the build output. commit d11d20de2889e95ad203d5950db3d4fa924ccc88 Author: Bart Van Assche Date: Sat Jan 13 10:07:56 2018 -0800 configure: Remove -std=c89 from the developer options The -std=c89 compiler option causes build failures for system header files that are not C89 compliant on at least Linux and NetBSD. Hence remove it again. commit ac70ceb04876cbadcb9d9c71636fcdf41133909a Author: Bart Van Assche Date: Sat Jan 13 09:36:59 2018 -0800 configure: Unbreak AIX support Avoid that the configure script fails as follows on AIX: ./configure[19598]: syntax error at line 19871 : `;' unexpected commit 09778607761a2c28d5d1ba171e95830956ad3bdd Author: Bart Van Assche Date: Mon Jan 8 18:41:16 2018 -0800 configure, MIBs: Detect whether __u64 etc need to be declared explicitly before including commit 28f3ef5e70964d84b94e865fdacd7f62825895f6 Author: Bart Van Assche Date: Sun Jan 7 19:45:41 2018 -0800 TUNNEL-MIB: RHEL 5 build fix commit 9e1f73baa40ecde93941855ddf3a8137a8ef87c7 Author: Bart Van Assche Date: Sun Jan 7 19:45:30 2018 -0800 RMON-MIB: Don't mix code and declarations commit f7b9d5a8529337e73532b33f875873b9a669d162 Author: Bart Van Assche Date: Sun Jan 7 19:50:51 2018 -0800 Document -std=c89 workarounds commit 26bc66b794a373970ed16d6b22940a2d6e0d5553 Author: Magnus Fromreide Date: Sun Jan 7 11:40:28 2018 +0100 Adapt to -std=c89 - the asm keyword ain't part of C89 but since this is code protected by __GNUC__ and it is using gnu extended assembler syntax I am assuming that a GNU-compatible compiler is in use and thus I can use the __asm__ keyword in place of asm commit 5d3a1c1ab173a1db23c301f4d1975e73ea8ccb69 Author: Robert Story Date: Fri Jan 5 11:13:11 2018 -0500 update COPYING - add VMware and ISI - remove/replace non-ascii characters commit 1dc44d4a8db1054a52185db0ad96d454ceb619d0 Author: Robert Story Date: Fri Jan 5 11:06:53 2018 -0500 update COPYING - add VMware and ISI - remove/replace non-ascii characters commit 654b1227d86407c2cd1ca6409be74c1d4fd58d77 Author: Bart Van Assche Date: Thu Jan 4 07:25:39 2018 -0800 Make the source code C89 compliant Change all occurrences of inline that are visible to Unix compilers into __inline__. Add -std=c89 to the developer compiler flags. Surround non-compliant header files with #define inline __inline__ / #undef inline. ---------------------------------------------------------------------- Changes: V5.7.3 -> V5.8.pre1 NOTE: changelog semi-arbitrarily cut based on date of 5.7.3 release commit 6dae3b81771801759fe76a9b9b8e9d1ca858496e Author: Robert Story Date: Wed Jan 3 23:15:06 2018 -0500 fix compiler warning for implicit fallthrough commit fcba8ae346a8b89df225942137892f1bbefdad6a Author: Robert Story Date: Wed Jan 3 23:14:38 2018 -0500 remove C++ comment commit 5238dcc6882bf65cb5c9b03a37653e0cd76a4894 Author: Robert Story Date: Wed Jan 3 18:49:39 2018 -0500 Version number update: 5.8.pre1 commit 39a746b6e6336aaa4dce04102d274fb916dbf351 Author: Bart Van Assche Date: Mon Jan 1 21:03:24 2018 -0800 MSVC, Makefiles: Move common compiler flags into win32/Configure Additionally, minimize the compiler include path. commit d4ef21d1f4fa14dec77dcf219d7906a971fe88b0 Author: Bart Van Assche Date: Tue Jan 2 20:59:11 2018 -0800 MSVC, Makefiles: Avoid using local input files This patch does not change the behavior of the makefiles but makes build failures easier to debug. commit 556c45bc66dd8529d8bc9ce9a31b08c453b3be2c Author: Bart Van Assche Date: Mon Jan 1 21:04:30 2018 -0800 Win32: Remove NMAKE_NETSNMP_USE_DLL Since the preprocessor macro NMAKE_NETSNMP_USE_DLL is not used anywhere, do not define it. commit 7b0faf1484f51d662365888f7fb20cbe0d15e1ed Author: Bart Van Assche Date: Wed Jan 3 16:56:14 2018 -0800 agent/mibgroup/mibII/kernel_linux.c: Convert from gnu89 back to c89 See also commit 142c4239771c ("MIB-II: Fix /proc/net/snmp parser"). commit 6c57dd6038de971abcdde98a5518c5e9980891b6 Author: Robert Story Date: Wed Jan 3 18:53:41 2018 -0500 remove references to 5.4 and it's branches from makerelease commit 500dfac5108c9f0b8c4071d3152794d3c269a4dd Author: Robert Story Date: Wed Jan 3 18:16:33 2018 -0500 re-fix run-autoconf - original commit 418132f43cc43231966a8b9672c626f60b991039 - ok in 5.7 - no history of how it broke in master - weird. bad merge? commit 0eee9d4345081bf6e367a271c1e460067a61f917 Author: Robert Story Date: Wed Jan 3 18:06:46 2018 -0500 remote --disable-U64 from makerelease config commit e76f067d0b264c3005ea86bcef0c755baeb44d36 Author: Robert Story Date: Wed Jan 3 14:04:19 2018 -0500 keep compiler happy - type agreement - rework case statement to eliminate implicit fallthrough commit 4c52f5eeea14bb1371741e738b6a79f4184f0a36 Author: Robert Story Date: Wed Jan 3 13:39:56 2018 -0500 keep compiler happy commit e6e3142d79fa45b84d28aab79373a5f7501ea9bf Author: Bart Van Assche Date: Mon Jan 1 21:03:24 2018 -0800 MSVC, Makefiles: Move common compiler flags into win32/Configure Additionally, minimize the compiler include path. commit dc9b48c92a52871bd96af23b8ce4932aaca8efac Author: Bart Van Assche Date: Tue Jan 2 20:59:11 2018 -0800 MSVC, Makefiles: Avoid using local input files This patch does not change the behavior of the makefiles but makes build failures easier to debug. commit ec1f412c923bb5dd3794ea6c7e9fae66c25df8bb Author: Bart Van Assche Date: Mon Jan 1 21:04:30 2018 -0800 Win32: Remove NMAKE_NETSNMP_USE_DLL Since the preprocessor macro NMAKE_NETSNMP_USE_DLL is not used anywhere, do not define it. commit c67c0aa92e6ec38a2952bf1a3db06a9351e6c062 Author: Bart Van Assche Date: Mon Jan 1 12:25:38 2018 -0800 MSVC: Suppress "possible loss of data" warnings Avoid that MSVC warns about assigning a large integer type (e.g. int) to a smaller integer type (e.g. u_char). Additionally, move the definitions of _CRT_NONSTDC_NO_WARNINGS, _CRT_SECURE_NO_WARNINGS and _WINSOCK_DEPRECATED_NO_WARNINGS from various Makefile.in files into win32/Configure. commit 116b432b7103d7056a8c71a65bae0e121ec79352 Author: Bart Van Assche Date: Mon Jan 1 12:07:28 2018 -0800 MSVC: Fix a compiler warning Avoid that the following compiler warning is reported when building with MSVC: include/net-snmp/library/scapi.h: warning C4005: 'OPENSSL_SYS_WIN32': macro redefinition C:\OpenSSL-Win32\include\openssl\opensslconf.h(26): note: see previous definition of 'OPENSSL_SYS_WIN32' commit c9ddbd2f9b464d3274b95950abb9bb357996acaa Author: Bart Van Assche Date: Mon Jan 1 11:37:11 2018 -0800 MSVC build fix for netsnmp_srandom() Ensure that HAVE_SRAND is defined when building with MSVC. commit 3f240be697a06950a1cf62ce8a6e17aa0289dedd Author: Bart Van Assche Date: Mon Jan 1 10:57:10 2018 -0800 snmplib: Fix netsnmp_random() commit 940888df4fa073a5db706fbffa6ec26a0de26de9 Author: Bart Van Assche Date: Mon Jan 1 08:35:10 2018 -0800 snmplib: Fix format specifiers and remove unused local variables Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") commit 1cfb9326cda38afd557a785c5cc08bcdfd8c248d Author: Bart Van Assche Date: Mon Jan 1 08:34:40 2018 -0800 apps/snmppcap: Fix three format specifiers Fixes: commit db2f552f427b ("WIP: snmppcap"). commit c57c1d25b3ab5742ada0430a15dcccb2bf250e74 Author: Bart Van Assche Date: Mon Jan 1 08:38:57 2018 -0800 configure: Add -Wextra to the developer compiler flags Additionally, since -Wextra implies -Wimplicit-fallthrough=3, -Wmissing-field-initializers, -Wsign-compare and -Wtype-limits, add -Wimplicit-fallthrough=2, -Wno-missing-field-initializers, -Wno-sign-compare and -Wno-type-limits. commit 0546b2c19b8a3d87399b74c389d6f6a10b44e076 Author: Niels Baggesen Date: Wed Apr 12 14:27:21 2017 +0200 Fix up FALL THRU annotations for gcc7 commit c8b555c9d9df959d215467e271425c9f1ef3ba43 Author: Bart Van Assche Date: Mon Jan 1 09:12:52 2018 -0800 DISMAN-TRACEROUTE-MIB: Suppress a warning about a set-but-not-used variable commit d621296fc78eec4f2b93933754260dfa1a10d020 Author: Bart Van Assche Date: Mon Jan 1 09:12:04 2018 -0800 MIB-II: Change one occurrence of 'const static' into 'static const' commit 3acca4b9b70839c6c9a8bb3c418f819308072cb1 Author: Bart Van Assche Date: Mon Jan 1 08:04:11 2018 -0800 Remove NETSNMP_ATTRIBUTE_UNUSED from function arguments Instead, add -Wno-unused-parameter to the developer flags. Note: Specifying -Wno-unused-parameter is only needed for older gcc versions. See also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57622. commit c2163c1758c5106e75ab01455e185adcd8c8ca13 Author: Bart Van Assche Date: Sat Dec 30 19:38:24 2017 -0800 Internal SSL implementation: Avoid that the compiler warns about unused values This patch does not change any functionality. commit c4f16a899dacd2230128694604733c6124463f44 Author: Bart Van Assche Date: Sat Dec 30 19:06:36 2017 -0800 configure: Detect whether or not the compiler supports __attribute__((unused)) Detect whether or not the compiler supports __attribute__((unused)) instead of having multiple (inconsistent) explicit tests in multiple places of the compiler version. commit 945ee1b6846c8d38197d714fd78f67b192d1a85f Author: Bart Van Assche Date: Thu Dec 28 15:47:55 2017 -0800 snmplib/scapi.c: Suppress three compiler warnings Suppress the following three compiler warnings: scapi.c: In function 'sc_encrypt': scapi.c:722:9: warning: unused variable 'new_ivlen' [-Wunused-variable] int new_ivlen = 0; ^~~~~~~~~ scapi.c: In function 'sc_decrypt': scapi.c:994:13: warning: unused variable 'aes_key' [-Wunused-variable] AES_KEY aes_key; ^~~~~~~ scapi.c:993:9: warning: unused variable 'new_ivlen' [-Wunused-variable] int new_ivlen = 0; ^~~~~~~~~ This is a follow-up for commit b964eebe0064 ("Unbreak the build on systems without OpenSSL, e.g. MinGW"). commit 599886c4f200ec1302a62d4856dd0bf2115f8899 Author: Bart Van Assche Date: Thu Dec 28 15:35:08 2017 -0800 DISMAN TRACEROUTE MIB: Remove a superfluous field width specifier commit 6a71aa93ee36c370ab20cba6a1192d3d3e780232 Author: Bart Van Assche Date: Thu Dec 28 15:31:25 2017 -0800 Add -Wno-format-truncation to the developer compiler flags commit 0f32973d1f011010ebb358b0b39601515019058c Author: Bart Van Assche Date: Thu Dec 28 15:22:54 2017 -0800 testing/fulltests/default/T035snmpv3trapdusermgmt_simple: Skip this test when using the internal SSL implementation commit 8c1625cf030a26ffaef7f826f8be5b0a9d344752 Author: Bart Van Assche Date: Thu Dec 28 14:43:21 2017 -0800 snmplib/openssl/openssl_des_local.h: Annotate switch statement fall-through commit e707a67c7265dc96043d09c6939bbc5d5fba20d0 Author: Bart Van Assche Date: Thu Dec 28 14:57:47 2017 -0800 snmplib/snmp_openssl: Fix X509_get_signature_nid() prototype See also . See also commit d686bc3502f1 ("CHANGES: snmplib: Add support for OpenSSL 1.1.0"). commit 215695f2307dc02399fa2bb789c2b1e790d8551e Author: Bart Van Assche Date: Thu Dec 28 14:05:14 2017 -0800 Change autoconf version back to 2.68 This change avoids that test 1 fails as follows: Checking the Net-SNMP configure script validity ......................... not ok 1 - found 0 copies of '^# Generated by GNU Autoconf 2.69 for Net-SNMP' in output (configure); expected 1 See also commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO"). See also http://net-snmp.sourceforge.net/wiki/index.php/Build_System. commit 723c7131f4f10558f7b9ddc9b48c81366ffd9c8d Author: Magnus Fromreide Date: Sun Dec 24 13:00:49 2017 +0100 Do not mix variables declarations and code commit 808e6bb814ffa69a0134be016c457832df352218 Author: Magnus Fromreide Date: Sun Dec 24 12:28:48 2017 +0100 Remove empty statement in the declaration list in order to bring it back to C89. commit ce05e7735384f61d636260fdc41152af75115296 Author: Bill Fenner Date: Fri Dec 22 01:43:08 2017 +0000 features: snmptls requires row_create commit 1e12ff5098c980f3d332f624843f3636fb3463ef Author: Bill Fenner Date: Fri Dec 22 01:40:15 2017 +0000 features: netsnmp_check_vb_storagetype calls check_storage_transition If we are not removing netsnmp_check_vb_storagetype, then we require check_storage_transition. commit 280e2a6dbd0d64c10d1a6904c4fb68afaf4b1617 Author: Bill Fenner Date: Wed Dec 20 22:49:35 2017 +0000 Prevent infinite loop when view is modified during agentx processing If the view changes while a request is being processed by an agentx subagent, we may get stuck on snmpEnableAuthenTraps.0 since check_acm sets type to ASN_PRIV_RETRY without turning off inclusive. The steps here: * getNext of snmpOutTraps.0 returns snmpSilentDrops ((Retry)) due to scalar_group's hole handling code. * check_getnext_results now sets inclusive=2, and the object to snmpEnableAuthenTraps.0 (the end of the range because of the hole) * we then do a getNext of snmpEnableAuthenTraps.0 with retry+inclusive, which turns into a get of snmpEnableAuthenTraps.0, which returns a value. * check_acm finds that snmpEnableAuthenTraps.0 is not allowed, so sets retry again without resetting inclusive; * we then do a getNext of snmpEnableAuthenTraps.0 with retry+inclusive, which turns into a get of snmpEnableAuthenTraps.0, which returns a value. * check_acm finds that snmpEnableAuthenTraps.0 is not allowed, so sets retry again without resetting inclusive; * ... commit 56c30b11f3616ea4f0c38a21e08e78f050096020 Author: Bill Fenner Date: Wed Dec 20 21:52:10 2017 +0000 NEWS: snmplib: PATCH: 1349: Fix perl/other crash against bad SNMPv3 agent With the patch in 1214, the snmp_api code assumed that if magic was set, it was the "struct synch-state" from snmp_client. Of course, magic belongs to the caller, and the perl library uses it differently, so reaching into it is verboten. Introduce a new callback (that was already introduced in 5.8) to report this "retries exceeded" state, and use it in snmp_client. commit 91b9d75c95afae172e1e0145a358a3d4f29451c0 Author: Bill Fenner Date: Wed Dec 20 20:59:14 2017 +0000 Use NETSNMP_DS_LIB_QUICK_PRINT instead of the old ucd compat function commit cbb40ded0faaf8ab8ee07746707ff3d4ed483911 Author: Bill Fenner Date: Wed Dec 20 20:58:12 2017 +0000 After b009ac9037e37566f78afab4a094d3b72f732846 we do not require snprint_value commit 41c5c3de6b552f01bb80c743cab8833f4f0e6bb8 Author: Bill Fenner Date: Wed Dec 20 20:53:33 2017 +0000 CHANGES: Fix crash when snmptable -OX run against object that's not a table (like .1) commit 6907d38ed0c7200e2c1fa0e00926061db59d1290 Author: Bill Fenner Date: Wed Dec 20 20:35:27 2017 +0000 Fix OID saved to config file for SHA224 authProto commit c450b7f6b836789aabbf5d78ad59a41c91b96249 Author: Robert Story Date: Wed Dec 20 14:39:37 2017 -0500 remove two more duplicate functions when TLS enabled commit 573355d4219180a8feb3429c4c5d345495160d27 Author: Robert Story Date: Wed Dec 20 14:15:12 2017 -0500 fix compile errors when TLS support enabled - fix prototype - remove duplicate function commit 3f6ef5a028f3d5142e68dff90dfbd95caf54b302 Author: Robert Story Date: Wed Dec 20 14:14:31 2017 -0500 remove dup DH_get0_* functions - fix ifdefs so version in snmplib is visible to apps commit 0c4709c062bd9e8da5090473454822c60fa5d9c7 Author: Bart Van Assche Date: Mon Dec 18 20:03:45 2017 -0800 snmplib: Avoid that warnings about if-statements with an empty body appear during compilation with --disable-debugging commit 831233136d30d26cd757fed293b22f0730642711 Author: Huseyin Alpaslan Yildiz Date: Mon Dec 18 18:35:08 2017 -0800 snmplib: Fix --disable-debugging build commit b964eebe0064b80946be0ca05c9dd2beb52f47e9 Author: Bart Van Assche Date: Sun Dec 17 14:05:42 2017 -0800 Unbreak the build on systems without OpenSSL, e.g. MinGW Fixes: commit 329a9d3c9d63 ("revamp auth/priv protocol constants handling") commit 3fd2b328a200d2ab6b0d1d07afbb5f57bc38a6ea Author: Bart Van Assche Date: Sun Dec 17 19:08:27 2017 -0800 OpenSSL-related MSVC build fixes commit c10b756d84978b9c3b5aa907fe8723b9869dc386 Author: Bart Van Assche Date: Sun Dec 17 08:40:44 2017 -0800 CHANGES: Introduce netsnmp_random(void) and netsnmp_srandom() This patch unbreaks the MinGW build. commit faa9deb85149e2dc247cd03bb9e5b60e112baba5 Author: Bart Van Assche Date: Sun Dec 17 14:15:30 2017 -0800 Fix a mismatch between the netsnmp_extend_kul() prototype and its caller Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") commit ad4fdcf42cca48c80f3de71c0d889a076a81763a Author: Bart Van Assche Date: Sun Dec 17 14:19:53 2017 -0800 Unbreak the compilation of the Perl modules Fixes: commit 329a9d3c9d63 ("revamp auth/priv protocol constants handling") commit f4b98f647260095fcec2b2a34d939b7ca30eda27 Author: Bart Van Assche Date: Sun Dec 17 14:00:39 2017 -0800 configure: Run autoreconf Fixes: commit 9e49de2e03b1 ("NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO") commit 7840643a40116881fc830ed9eb2d5b06250f9fe5 Author: Robert Story Date: Thu Dec 14 12:03:38 2017 -0500 remove duplicate definitions of openssl compat functions commit efa3e4a9da0ff76d166e6e9cc66e88a9d040ea84 Author: Robert Story Date: Fri Dec 15 17:30:06 2017 -0500 check rc for checkout commands commit b66e90964e52addebbb50d294f1aa41463b8eaed Author: Robert Story Date: Fri Dec 15 17:20:28 2017 -0500 remove references to dead FTP mirrors commit 317c7f97ccb2fcbcdd90d17040e218eddd0cd16b Author: Robert Story Date: Fri Dec 15 17:00:21 2017 -0500 remove CVS scripts; change SVN refs to GIT commit be94477c2c94de10c230bbe690391b7463cf1f7d Author: Robert Story Date: Thu Dec 14 22:37:26 2017 -0500 whitespace changes commit 9e49de2e03b18ceb1b7cba2e715ad6180f394815 Author: Robert Story Date: Thu Dec 14 11:53:13 2017 -0500 NEWS: snmplib: AES-192/AES-256 compatibility with SNMP Research / CISCO - they use key localization algorithm from draft-reeder-snmpv3-usm-3desede-00 instead of the Blumenthal draft Also: - configure option to enable larger AES key length code - localized key extension via blumenthal and reeder method commit a0b25857bdddf70cc3f6f7d0c0211781b8dc3070 Author: Robert Story Date: Thu Dec 14 10:39:29 2017 -0500 debug tweaks commit 1a5d5104c7611a3142f63429f0dd0943ca573d00 Author: Robert Story Date: Thu Dec 14 10:33:20 2017 -0500 increase buffer size for larger hashes commit aa83281293a369ee372d749a84eb22fb8f083b5b Author: Robert Story Date: Thu Dec 14 10:31:39 2017 -0500 rework T010scapitest_capp.c to test all auth/priv protocols commit 9f3a2a8408d74e2f52c160fcb877994f6b664df9 Author: Robert Story Date: Thu Dec 14 10:28:43 2017 -0500 consistency in generate/check keyed hash functions; add debug - use mac length in both - tweak debug output when testing code enabled commit ba3f4cb85f85108dcf5f8867a43f439c000ca737 Author: Robert Story Date: Thu Dec 14 10:25:04 2017 -0500 remove unused PADSIZE defines; all AES IV sizes are 128 - remove outdates comments -reorderd defines by key/mac length commit 329a9d3c9d63e0dc2c3bc3374f52611d264fa1c3 Author: Robert Story Date: Thu Dec 14 09:32:31 2017 -0500 revamp auth/priv protocol constants handling - move constants into arrays - remove hardcoded protocol OID lengths commit 7b2f35cadd146ea78571342d366be6e937a35c29 Author: Robert Story Date: Fri Sep 29 18:32:05 2017 -0400 NEWS: snmplib: Restore AES-192 and AES-256 privacy protocols - from draft-blumenthal-aes-usm-04 (precursor to RFC 3826) - Revert "Use AES instead of AES128,192,256" - Use OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt This reverts commit 2ca67bf94a380dc4e1b2322d4ef0024889938413 but also contains additional changes. Some code borrowed from PATCH 1346, thanks to Alexander Ivanov and Vladimir Sukhorukov. commit 0f7f5394f4432ba140a67edd5490791fca997f47 Author: Robert Story Date: Thu Dec 14 10:40:12 2017 -0500 add missed places for saving master key commit 1e99bf92950380049beedb5cffa640d28e9e8fbe Author: Robert Story Date: Thu Dec 14 10:41:16 2017 -0500 compare correct var when enforcing priv policy commit 96895c81165367bb0d70f91c5afbf4b4299c1acd Author: Robert Story Date: Thu Dec 14 12:03:38 2017 -0500 remove duplicate definitions of openssl compat functions commit 31cad3aa4a31730d769d7a20eac61018f0ee7d98 Author: Robert Story Date: Wed Dec 13 23:14:11 2017 -0500 check the right variable in condition commit 08e179bad581ccb5fd4220b7f41bfa76be8352c9 Author: Robert Story Date: Thu Dec 14 10:10:32 2017 -0500 remove dead branches from shell-functions commit e3782d32e05f550dfd3036261c8951f559b9d814 Author: Robert Story Date: Thu Dec 14 09:51:56 2017 -0500 log error when scoped pdu parsing fails commit 020a17cf90a258160175473aa0d6d84861215921 Author: Robert Story Date: Thu Dec 14 09:44:52 2017 -0500 fix compiler warnings when testing code enabled commit 9bafb8af58da10de28826a6c5ecd63b535367c50 Author: Bart Van Assche Date: Tue Dec 12 21:48:51 2017 -0800 configure: Suppress an autoconf warning commit 5ba0a484b4b023a54aff78d8c31f7d5b41c50b56 Author: Bart Van Assche Date: Tue Dec 12 17:53:16 2017 -0800 configure: Add -Wno-sign-compare and -Wno-pointer-sign to the developer flags commit 99072b71cfa2b8745945ff6008544203bf00d612 Author: Bart Van Assche Date: Tue Dec 12 17:51:33 2017 -0800 apps/snmpusm.c: Restore p and g checks commit af5d5fdf220a816245885e69ea18ca3ee04aa752 Author: Bart Van Assche Date: Sun Dec 10 17:58:36 2017 -0800 apps/snmptrapd_sql.c: Remove #include From a recent version of the libmysqlclient development package, about my_config.h: This file should not be included by clients, include only commit 6c2f7bc1d139f865cab40ce6e0d7f93714f44d3f Author: Bart Van Assche Date: Sun Dec 10 16:08:39 2017 -0800 configure.in: Remove Commit d8e7bc024600 accidentally added the v5.4 configure.in script to the v5.7 branch. Remove this script since the configure.ac script is used on the v5.7 branch. commit e85ab00df2177ac4235632d88dd87262515e2e74 Author: Bart Van Assche Date: Sun Dec 10 15:19:59 2017 -0800 HOST-RESOURCES-MIB: Build fix Use config_require() instead of netsnmp_feature_require(). See also commit 33de26829121 (Patch 1327). commit d686bc3502f137f10e38fe719921c765cefa38fb Author: Bart Van Assche Date: Sat Dec 9 21:44:06 2017 -0800 CHANGES: snmplib: Add support for OpenSSL 1.1.0 commit 488e812deb7baac6225acabc552885c6ca2cc806 Author: Bart Van Assche Date: Sat Dec 9 18:43:02 2017 -0800 CHANGES: snmplib: Add support for OpenSSL 1.1.0 Add configure tests for EVP_MD_CTX_new() and EVP_MD_CTX_free(). Move the OpenSSL backports from agent/mibgroup/snmp-usm-dh-objects-mib/usmDHUserKeyTable/usmDHUserKeyTable_data_get.c to snmplib/snmp_openssl.c. commit 8e1f21659275cbafb596e3fd9819d9512716ffee Author: Bart Van Assche Date: Sat Dec 9 19:04:13 2017 -0800 CHANGES: snmptrapd: Add support for the latest libmysqlclient version commit a97fe4a69cf60e1b70547b4b57d5aacb7f98520e Author: lijo Date: Sat Dec 9 18:18:58 2017 -0800 CHANGES: BUG: 2802: Ensure that snmpwalk shows all ipNetToMedia (ARP) entries See also https://sourceforge.net/p/net-snmp/bugs/2802/. commit ee474421033c1cbc1923ed8ab7b867cf9f066efe Author: Bart Van Assche Date: Mon Dec 4 06:58:28 2017 -0800 CHANGES: BUG: 2814: Export snmp_enable_calllog() on Windows commit fa29b90482453b4bbe225258930daf6e932d31a7 Author: Bart Van Assche Date: Sun Nov 26 18:43:45 2017 -0800 configure: Regenerate commit e3bed7d1871786f6ed4a5b02885aac8166efc608 Author: Bart Van Assche Date: Sun Nov 26 18:12:51 2017 -0800 snmplib: Simplify snmp_vlog() See also https://sourceforge.net/p/net-snmp/bugs/2813/. commit 728a0230477fd1ed598a2f3d55f376af6db48aec Author: Bart Van Assche Date: Tue Jul 11 20:16:41 2017 -0700 Win32: Unbreak MSVC build See also commit ad50133f2c5a ("snmplib: Add asprintf()"). commit dec619dc21690aecd7c2948165d012195fba0062 Author: Niels Baggesen Date: Tue May 9 14:29:34 2017 +0200 snmplib/asprintf.c: The argument list must also be changed when changing the function from realloc to malloc. commit 131005a36d634db2806ddcdfe8045394b7a73529 Author: Niels Baggesen Date: Tue May 9 14:28:47 2017 +0200 snmplib/asprintf.c: Some systems still have __va_copy, not va_copy. commit 31df4b680807f8c8c9f8d5b441a18e596129d02e Author: Bart Van Assche Date: Thu May 4 18:13:04 2017 -0700 snmplib, asprintf(): Make behavior conformant with glibc and FreeBSD Use malloc() internally instead of realloc(). Clear the pointer to the output string if memory allocation fails. See also https://www.freebsd.org/cgi/man.cgi?query=asprintf commit 4ad885bc3047f7a69bb8f12e9bc9df73768611c2 Author: Bart Van Assche Date: Sun Apr 16 09:03:20 2017 -0700 snmplib: Add asprintf() Add an asprintf() implementation for the platforms that do not provide asprintf() through their C library. commit 4cfc23f4bc81ed4ca4c6d07077e82c7983919db3 Author: Robert Story Date: Thu Nov 23 01:56:52 2017 -0500 fix path and hardcoded user in rsync upload command commit 53239e2272effdd1bce003f629aa671f4fd5db34 Author: Robert Story Date: Wed Nov 22 13:45:58 2017 -0500 CHANGES/NEWS update for 5.4.5.rc1 commit b5846fac182e458f7edf4afb544e3537cb1de8ac Author: Robert Story Date: Wed Nov 22 13:35:32 2017 -0500 ChangeLog update for 5.4.5.rc1 commit 2a424d11c0c8b3adf260defd54f16c8670570fb1 Author: Robert Story Date: Wed Nov 22 13:26:40 2017 -0500 make depend for 5.4.5.rc1 commit 454212142ed531cf842703831a187177e27923fa Author: Robert Story Date: Wed Nov 22 11:20:03 2017 -0500 add missing titles; update gpg key for signing; remove refs to svn commit d688d9cceece90af6c620345d2c5fb0468df924e Author: Robert Story Date: Thu Oct 26 23:22:04 2017 -0400 remove commented code commit 032b28d9c1ad174c70f25e31757c3d427fb96bad Author: Robert Story Date: Thu Oct 26 22:36:30 2017 -0400 add --disable-U64 to makerelease.xml commit 3b36fec8fb13fd5cf0ed7423b8c5d0943d8ea989 Author: Robert Story Date: Thu Oct 26 21:42:33 2017 -0400 Release Candidate for V5-4-patches commit d8e7bc0246009a9ac58784c1b67baafb44d77902 Author: Robert Story Date: Thu Oct 26 21:42:29 2017 -0400 Version number update: 5.4.5.rc1 commit a5b4994061b1c45a960ff3e5e3941ae7ee295541 Author: Robert Story Date: Thu Oct 26 15:24:32 2017 -0400 remove distrelease script (should be using newest version from github) commit d687248669257328805cf0a6ff00428d0f8db66c Author: Andrea Biscuola Date: Thu Oct 19 07:29:00 2017 -0700 CHANGES: BUG: 2803: Fix a use-after-free in _sess_open() This patch fixes a crash on OpenBSD 6.1-CURRENT. commit bba1451f8ae64e3f58986408041a28f8e34e6f35 Author: Niels Baggesen Date: Thu Oct 19 21:09:30 2017 +0200 BUG 2788: fix memory leaks in error paths. Thanks to shqking. commit 2f739528b6ff89c28c58f98b0e81a2568b72348e Author: Niels Baggesen Date: Thu Oct 19 21:06:02 2017 +0200 BUG 2452: fix core dump from bad data to snmp_add_var Thanks to bottles and Thiruvadi Rajaraman commit d1211659f39e0795af7ef1c83f72356dae239e3d Author: Niels Baggesen Date: Thu Oct 19 21:04:34 2017 +0200 Augment mib-II.h for DragonflyBSD 5.0 commit d4278ee5b2ac069380d690d3a64e9690dc0b1ed6 Author: Niels Baggesen Date: Tue Sep 19 05:37:43 2017 +0200 rfclist: add RFC 8173 PTPBASE-MIB commit 8e4977513f45e5274e0fe75b1864c94c0a9b3eba Author: Niels Baggesen Date: Tue Sep 19 05:36:30 2017 +0200 snmptable, snmpnetstat: fix complaints from gcc -fsanitize=address commit 30694e0470ab3f6d4524dd106eb2d8195a84b518 Author: Bart Van Assche Date: Sat Aug 26 16:48:50 2017 -0700 DISMAN-PING-MIB: Initialize 'sndbuf' before using it This was detected by gcc. commit 8cace1bb6088e238d1c88b209875e403ddec1f0d Author: Bart Van Assche Date: Tue Aug 15 20:35:50 2017 -0700 snmpd, snmptrapd: Declare option strings as static const char [] This patch does not change any functionality. commit 4897ddcbe9fd16884809c37fc4ffee82469cc297 Author: Bill Fenner Date: Sat Jul 29 19:41:54 2017 -0700 CHANGES: snmptrapd: BUG: 2782: from "Josef Ridky": fix linking with MariaDB/MySQL commit 60c9996efe07dad51d7712eda7c5174b476eab5f Author: Bill Fenner Date: Mon Jul 17 06:15:47 2017 -0700 NEWS: snmplib: BUG: 2592: from Stuart Kendrick - increase MAXTC to 16384 commit aa978fddfeb8fa02efca10ae1fbad2bcd3fb8ebc Author: Bart Van Assche Date: Tue Jul 11 07:33:47 2017 -0700 Win32: Fix sh_count_procs() See also commit 9b9c0e287b4d ("MIBs: Use asprintf() instead of snprintf() to prevent truncation"). commit 2c79a264d721ab11d51e2056d50dc3eb89069026 Author: Bart Van Assche Date: Tue Jul 11 20:16:41 2017 -0700 Win32: Unbreak MSVC build See also commit ad50133f2c5a ("snmplib: Add asprintf()"). commit 0ab4a9f4aa5b9f4470549fdd9a09e03fa525d9ba Author: Bart Van Assche Date: Tue Jul 11 06:40:54 2017 -0700 CHANGES: BUG: 2789: MinGW: Use closesocket() instead of close() commit 15a2435e4db0ac9d44135dfa8a5fbf1b8b7391d8 Author: Niels Baggesen Date: Tue Jun 13 08:44:06 2017 +0200 Fix counters for 10Gb interfaces on FreeBSD. Fixes bug 2741. Patch from Andrey V. Elsukov forwarded by Ryan Steinmetz. commit 89ba4945bc31abc0b2a153cca1228a4aac081a4f Author: Niels Baggesen Date: Tue Jun 13 08:43:12 2017 +0200 regenerated net-snmp-config.h.in commit 452ccd8dee92ce021c3828bec01e95720ff016b3 Author: Niels Baggesen Date: Tue Jun 13 08:36:09 2017 +0200 rfclist: add 7697 and 8150. commit 65128febb24bddb39061e2d06993c8449e37860e Author: Bill Fenner Date: Tue May 30 14:13:34 2017 -0700 Allow clients to use reqid zero Some of 9bce2c9519a0551ee0c82ac4706fd9f3f875feab got lost when merging it to master. Re-apply the changes to handle snmp_*send() returning 1 when successfully sending a PDU with reqid 0. commit a4f683068e48fe70430d95a8ec26ff7395530893 Author: Bill Fenner Date: Tue May 30 13:53:08 2017 -0700 python bindings require netsnmp_malloc and _free aeb0116b introduced use of netsnmp_malloc and _free, so require these features. commit e819b1689d3c67586cf1bd3b5f19cca880ba3ba4 Author: Bill Fenner Date: Tue May 30 13:50:38 2017 -0700 register_const_config_handler is not optional snmp_enum.c, which is not optional, calls register_const_config_handler, so it is also not optional. commit b5233965343d4c9347cb45cdca442361396e4224 Author: Niels Baggesen Date: Mon May 29 21:46:53 2017 +0200 ipaddress_solaris2.c: Fix an ipv6 memory leak. Fixes bug 2783. Thanks to lijo. commit 93c8f127c72f5691834c7e8b1849015b655fb228 Author: Niels Baggesen Date: Tue May 23 07:58:49 2017 +0200 swinst_rpm: Update to use headerGet when available, in place of the long deprecated headerGetEntry. commit 78a18abf05b755804a4f4403b8f26effbeafdc79 Author: Niels Baggesen Date: Tue May 23 07:37:27 2017 +0200 swintst_rpm: Protect against unspecified Group name. Fixes bug 2780. commit eb3bdab6391a8cae9dc1d2fe77a97708a2c46e99 Author: Bart Van Assche Date: Sun May 14 19:23:01 2017 -0700 Python bindings: Use a table to make the type conversion code more compact This patch does not change any functionality. commit fb12aad657782014e409e31d53770cc4f77333f1 Author: Bart Van Assche Date: Sun May 14 19:24:13 2017 -0700 Python bindings: Constify __translate_appl_type() argument commit 6f29a6aa6751fe372d48cf8f6e1d8b6c0b7199af Author: Bart Van Assche Date: Sun May 14 18:53:44 2017 -0700 Python bindings: Make __sprint_num_objid() enlarge the output buffer if necessary commit fda5f4567a0e86a2227cfa629951b8c62ab52283 Author: Bart Van Assche Date: Sun May 14 18:43:57 2017 -0700 Python bindings: Use the ANSI C function definition syntax commit 097acfcd83c47b44adffd6637cf3e8e0827f5abb Author: Bart Van Assche Date: Sun May 14 18:37:51 2017 -0700 Python bindings: Inline SAFE_FREE() ANSI C allows to pass a NULL pointer to free(). Hence change SAFE_FREE() invocations into free(). commit c2a26b5fe505133d88a17a8562026261f04a394d Author: Bart Van Assche Date: Sun May 14 18:35:54 2017 -0700 Python bindings: Remove the macro DBPRT() because unused commit 368636fd94e484a5f4be5c0fcd205f507463412a Author: Bill Fenner Date: Sun May 14 13:55:23 2017 -0700 Ignore snmppcap commit 6530b948b15057ee74475281f96fe00d757be53c Author: Bill Fenner Date: Thu May 11 15:32:34 2017 -0700 Fix special handling of tcpInErrs and tcpOutRsts Teach the new /proc/net/snmp parser about the special tcpInErrsValid and tcpOutRstsValid attributes, which are set only if these values were present in the file. If the *Valid attributes are not set, the scalars are not served, even if there are nonzero values in them. commit b009ac9037e37566f78afab4a094d3b72f732846 Author: Bart Van Assche Date: Wed May 10 20:13:26 2017 -0700 Python bindings: Allow __snprint_value() to resize the output buffer for more data types commit 3ba02b2af206fbe56ef73fe4ec10c651b6facfab Author: Robert Minsk Date: Wed Feb 8 11:39:18 2017 -0800 Python bindings: Allow __snprint_value to resize buffer [bvanassche: Restored code for '\0'-termination of __snprint_value() output] commit aeb0116b7d2c069eabc1fa6339ce150efca9212c Author: Robert Minsk Date: Mon Feb 6 17:59:29 2017 -0800 Python bindings: Avoid truncation of strings See also https://sourceforge.net/p/net-snmp/code/merge-requests/8/. [ bvanassche: Removed code for '\0'-terminating strings that were already '\0'-terminated ] commit 71e669ba82668eee51295afbcef9f8db4cfb77ff Author: Niels Baggesen Date: Tue May 9 14:29:34 2017 +0200 snmplib/asprintf.c: The argument list must also be changed when changing the function from realloc to malloc. commit 7d7bfe6d0fd8afae0a6c85f1fb5c6f36873328c9 Author: Niels Baggesen Date: Tue May 9 14:28:47 2017 +0200 snmplib/asprintf.c: Some systems still have __va_copy, not va_copy. commit df8d86164aebdfacf2b7e8f02b8eb5d74db30c77 Author: Bart Van Assche Date: Sun May 7 20:00:25 2017 -0700 snmpd: Fix a copy-paste error Detected by Coverity. commit a5ba31ed29586fe224ef153cff465dd9db80ef98 Author: Bart Van Assche Date: Sun May 7 19:58:48 2017 -0700 snmplib: Use strlcpy() instead of strcpy() to copy a variable-length string into a fixed-size array commit 97da169eeab8511786a34883abc956df81aef743 Author: Bart Van Assche Date: Sun May 7 19:55:34 2017 -0700 snmplib/snmptsm: Remove dead code The pointer to the first element of an array is never NULL. Hence remove a check that compares an array pointer against NULL. Detected by Coverity. commit 71107f561c1cf3cfe0c6a915c3163ed2f19895b1 Author: Bart Van Assche Date: Sun May 7 19:53:51 2017 -0700 snmptrapd: Pass a positive integer to setuid() Detected by Coverity. commit b3cbf1f383619eaa14b62a7536304824a91be274 Author: Bart Van Assche Date: Sun May 7 19:36:01 2017 -0700 MIB-II: Fix an out-of-bounds array access Detected by Coverity. commit 0fa0ad1624c8fe2ae2fc7d4a7b0332ea5f910793 Author: Bart Van Assche Date: Sun May 7 19:29:42 2017 -0700 snmplib, callback mechanism: Enlarge MAX_CALLBACK_SUBIDS The largest callback ID defined in include/net-snmp/agent/agent_callbacks.h is 16. Make sure it fits in the thecallbacks[][] array. Spotted by Coverity. commit f585363fadfe7d965e2232560e2db227bb251cdd Author: Bart Van Assche Date: Sun May 7 19:28:05 2017 -0700 snmp_unregister_callback(): Check arguments before using these Spotted by Coverity. commit b0c18a5315f0d5a14505a0864e755c5a70b60a1e Author: Bart Van Assche Date: Sun May 7 19:19:31 2017 -0700 snmplib, netsnmp_strdup_and_null(): Simplify this function Although the implementation of this function looks correct to me, Coverity did not recognize that the else-part NUL-terminates the result string. Hence simplify the code and make it easier to analyze. commit 54454a549beaea5e2a4dfefa8db44f1106965baf Author: Bart Van Assche Date: Fri May 5 21:34:22 2017 -0700 snmplib, container: Avoid dereferencing a NULL pointer Detected by Coverity. commit b906c60c8a436d7360267a6d242526b33a9aaac8 Author: Bart Van Assche Date: Sun May 7 16:39:59 2017 -0700 apps/snmpusm: Only provide a DH_get0_key() replacement if openssl is available commit e4c6937483d4a680570cec05388d2e4b291868a6 Author: Bart Van Assche Date: Fri May 5 22:00:20 2017 -0700 MIBs: Use strlcpy() instead of strcpy() to copy a variable-length string into a fixed-size array commit 3041b6718642e7834cd7c749d56ac862e79352c9 Author: Bart Van Assche Date: Fri May 5 21:29:35 2017 -0700 snmplib, asn_parse_objid(): Remove a superfluous check Checking a pointer after it has been dereferenced is not useful, hence remove the pointer check. Detected by Coverity. commit b59639a940f6e09590a4a58cfcca6bc696223824 Author: Bart Van Assche Date: Fri May 5 20:11:06 2017 -0700 Fix yet another use-after-free issue in an error path This was detected by Coverity. commit 11930128aafeab8d3b92a473c0388d44f317ab11 Author: Bart Van Assche Date: Fri May 5 20:15:15 2017 -0700 snmplib, ctime_to_timet(): Initialize tm_isdst Spotted by Coverity. commit 565f61ad8a254735fd23f68daa58bb4644838712 Author: Bart Van Assche Date: Fri May 5 20:11:06 2017 -0700 Fix use-after-free issues in error paths reported by Coverity commit 45b14f460f9f6a5c8043f8e1eee90a5696d89060 Author: Bart Van Assche Date: Fri May 5 20:00:24 2017 -0700 ucd-snmp/dlmod: Fix a recently introduced use-after-free Avoid that 'tmppath' is used after having been freed. This was detected by Coverity. commit 4984f7456aa0788b1bf18c0b890e199a27574921 Author: Bart Van Assche Date: Thu May 4 18:42:50 2017 -0700 apps/snmpusm: Only provide a DH_get0_pqg() replacement if openssl is available commit 185539c4360fddf7f569dda79e21d0fedef042d4 Author: Bart Van Assche Date: Thu May 4 18:13:04 2017 -0700 snmplib, asprintf(): Make behavior conformant with glibc and FreeBSD Use malloc() internally instead of realloc(). Clear the pointer to the output string if memory allocation fails. See also https://www.freebsd.org/cgi/man.cgi?query=asprintf commit f1b6e016e2fd76770dd1ecbc2f9d7bbbf7052ce1 Author: Bart Van Assche Date: Tue May 2 18:02:49 2017 -0700 apps/snmppcap.c: Fix a compiler warning Change the type of the 'reqid' argument from unsigned int into int. commit 673f81051d58b7045eb9a38201eeaba878eebf3d Author: Bart Van Assche Date: Mon Apr 17 18:56:00 2017 -0700 snmplib, SNMPv3: Fix two memory leaks in netsnmp_parse_args() These were detected by Valgrind. commit 9b9c0e287b4dd4619da3e3ca80e1832dc1c81699 Author: Bart Van Assche Date: Sun Apr 16 19:19:51 2017 +0200 MIBs: Use asprintf() instead of snprintf() to prevent truncation This patch addresses most gcc 7 warnings about output buffer truncation. commit 6168fbae0c80d82f664864335206820091cec2b0 Author: Bart Van Assche Date: Sun Apr 16 18:42:49 2017 +0200 DISMAN-MIB, traceroute: Allocate error string dynamically commit 63ee31079d838b4ffc60cfadab124612b83e945b Author: Bart Van Assche Date: Sun Apr 16 18:40:11 2017 +0200 MIB-II, sendmail: Allocate paths dynamically This patch avoids path truncation. commit 632acaf38228f795e37e2d3e5edaedae4d8b3356 Author: Bart Van Assche Date: Sun Apr 16 18:21:25 2017 +0200 snmplib: Fix the code for generating a parser error string Avoid that the error string gets truncated to the number of characters that corresponds to the size of a pointer. This patch fixes a bug introduced through commit 56064b8a53da and that was detected by gcc 7. commit ad50133f2c5a83e3d821b5a11c42b1114367500e Author: Bart Van Assche Date: Sun Apr 16 09:03:20 2017 -0700 snmplib: Add asprintf() Add an asprintf() implementation for the platforms that do not provide asprintf() through their C library. commit 44f91ac3982b17854d567287375b6df4e344025b Author: Bart Van Assche Date: Sun Apr 16 18:24:32 2017 +0200 snmplib: Annotate fallthroughs such that gcc 7 can recognize these commit 7cf96da14c179e26768eeb73aaa81de1fa5d966f Author: Bart Van Assche Date: Sun Apr 16 17:37:59 2017 +0200 DISMAN-MIB: Initialize 'name' properly Initialize all elements of name[] instead of only MAX_OID_LEN / sizeof(oid) elements. This was detected by gcc 7. commit 0b85614310a966dfce97c9a63b7f6b5ae22f1d0b Author: Bart Van Assche Date: Sun Apr 16 18:28:32 2017 +0200 snmplib: Avoid that gcc warns about a variable being set but not used commit 739a768d3e898ce83c2b06a3b772783510166583 Author: Bill Fenner Date: Tue May 2 10:59:27 2017 -0700 Rearchitect snmppcap so that it uses public APIs Use a funny series of callbacks and a fake file descriptor to allow snmppcap to read from the pcap "transport". commit ac6683caae8110ccf668eb704a0448660447d33d Author: Magnus Fromreide Date: Fri Sep 25 18:50:54 2015 +0200 Add a fourth value to the oid list, the raw data of the value. The point of this is to provide the value directly, avoiding having to force clients to guess what the value was. The type of the parameter depends on the type tag in [2], according to the following: INTEGER Signed integer OCTET STRING, Opaque, BITS, IpAddress, Counter64, I64, U64, C64 String Counter, Gauge, TimeTicks, UInteger Unsigned integer OBJECT IDENTIFIER NetSNMP::OID NULL, anything else undef commit c8ba362f9e2b3d57de7942d7c7f11c12a9184fc0 Author: Magnus Fromreide Date: Fri Sep 25 18:39:30 2015 +0200 Factor out the construction of OID objects to a separate function. commit 0b5fe83e17eed871fd6e812012df57eed48b7a5a Author: Niels Baggesen Date: Tue Apr 18 19:32:06 2017 +0200 RFC 8096 updates to deprecate IPV6 mibs. commit 014a706642d8f44f9ef00f561141fdf7e5c6f476 Author: Niels Baggesen Date: Tue Apr 18 19:30:56 2017 +0200 Update to current version of IANAifType-MIB. commit c3fb39cfe7f3ef9333cf9f107719af7f03af584a Author: Niels Baggesen Date: Thu Apr 13 12:08:10 2017 +0200 Fix snmpd -v to exit after displaying version info. commit 5adf9eeac9b18269a4af302e0ca1884e83507306 Author: Niels Baggesen Date: Thu Apr 13 11:42:34 2017 +0200 Patch 1340, thanks to John Baldwin. Always pass a valid flag to getfsstat on *BSD. commit 33de26829121dfa64aa4ddff6ff7977030b57691 Author: Niels Baggesen Date: Thu Apr 13 11:26:48 2017 +0200 Patch 1327, Thanks to Elan Ruusamäe. Improvements to HOST-RESOURCES-MIB::hrSWInstalled on debian systems - add Install Date information instead of bogus 0-1-1 - include Arch in package names, like rpm output does - use debian native separators `_` for package components, not rpm ones: `-` to test: snmpbulkwalk localhost HOST-RESOURCES-MIB::hrSWInstalled commit d072d7f84f11c4c798c26f5d2b50d4082ec9049c Author: Niels Baggesen Date: Thu Apr 13 11:23:09 2017 +0200 swinst_apt.c: Fix indexing of hrSWInstalledTable to start from 1. Fixes bug 2770. Thanks to Edward Hu for reporting. commit 6d4988075ef12b327d32b34b7888d7c7deeb69e8 Author: Niels Baggesen Date: Wed Apr 12 14:28:27 2017 +0200 Re-enable implicit-fallthrugh warning for gcc7. commit 91046bab5a8916610e23c4b829945cdfdd49c203 Author: Niels Baggesen Date: Wed Apr 12 14:27:21 2017 +0200 Fix up FALL THRU annotations for gcc7 commit fdea26d1057bd67f0d6cdca65cd5761006fc777a Author: Bart Van Assche Date: Sun Apr 9 21:05:18 2017 -0700 gcc 7: Add -Wno-implicit-fallthrough Apparently gcc 7 does not recognize the fallthrough annotations in the Net-SNMP source code. Hence disable compiler warnings about implicit fallthrough. commit 0657b90b7181fd95970d14949b3486e0290b87db Author: Bart Van Assche Date: Sun Mar 26 21:01:15 2017 -0700 Cygwin, scapi.h: Fix build Recent versions of the Cygwin openssl header files and are incompatible because both define X509_NAME unless OPENSSL_SYS_WIN32 is defined. Hence avoid including openssl header files in source files that include . commit 9641b472ef01208f92631016e91b0a4a518163f0 Author: Bart Van Assche Date: Sun Apr 9 19:52:20 2017 -0700 openssl 1.1.0: Fix several build errors Autodetect DH_get0_pqg() and DH_get0_key() to unbreak the MinGW build. In recent versions of openssl several data structures have been made opaque that were not opaque before. Avoid that attempts to access members of these opaque data structures cause the build to fail. commit e3bd88398c8744b6761f09bc7722e2faddadc361 Author: Bart Van Assche Date: Sun Apr 9 16:14:30 2017 -0700 MinGW: Fix build The Microsoft header files define PMIB_IPFORWARDROW as a pointer to struct _MIB_IPFORWARDROW. Recent MinGW header files define the same type as a pointer to struct MIB_IPFORWARDROW. Avoid that this difference causes the build to fail. commit b27c12660585e48d7cad7356f3c04e6210ff40b7 Author: Bart Van Assche Date: Sun Apr 9 19:36:37 2017 -0700 Win32, MSVC: Provide a definition of NETSNMP_ATTRIBUTE_DEPRECATED See also commit 06bfd94bc005. commit d44dc93940bdcfd0ef6c0ae0bbc0eaa6685d255c Author: Bart Van Assche Date: Mon Apr 3 07:37:49 2017 -0700 python, test.py: Split unit tests Additionally, automate checking of the test results. commit 975699d4d13f7476fa41f57522241e43a8114c9a Author: Bart Van Assche Date: Fri Mar 31 20:18:07 2017 -0700 python, test.py: Make snmpd port configurable Send SNMP requests to localhost:${SNMP_SNMPD_PORT:-161}. commit a3d28340ff7db9876ef38176eeddcea423a06a35 Author: Bart Van Assche Date: Fri Mar 31 20:25:28 2017 -0700 python, test.py: Avoid that pylint complains about lines that are too long commit af48afd40c8592310aa5550c2b42266896eff949 Author: Bart Van Assche Date: Fri Mar 31 20:24:44 2017 -0700 python, test.py: Add class and method docstrings commit f62913a91261c1c205a08ffe676f660d5c3c2998 Author: Bart Van Assche Date: Fri Mar 31 20:22:25 2017 -0700 python, test.py: Avoid using the keyword "vars" as a variable name commit 6a227a06215a57d755f7a479d34a13e91eb98f2c Author: Bart Van Assche Date: Fri Mar 31 20:20:17 2017 -0700 python, test.py: Remove unused imports commit 1f2c92d3b67dd57a1ec0adf19012946cf22d8688 Author: Bart Van Assche Date: Fri Mar 31 19:42:37 2017 -0700 python, test.py: Fix pylint warnings about the use of whitespace commit da6836234d6fde353d5a2cc6427f3172a416771e Author: Bart Van Assche Date: Sat Apr 1 19:38:50 2017 -0700 python, client.py: Add __str__() methods This makes the output of str() more meaningful for the classes defined in client.py. commit b2ce7bedd92c77923a686113af66a87b60e97f94 Author: Bart Van Assche Date: Sat Apr 1 19:48:26 2017 -0700 python, client.py: Remove superfluous semicolons commit 9133c091647ad8acd059afaa00d6fa3ccb1317cf Author: Bart Van Assche Date: Sat Apr 1 19:47:50 2017 -0700 python, client.py: Avoid using keywords as variable names commit a0720d44c709c6fee1de71da764d82c672651a9c Author: Bart Van Assche Date: Sat Apr 1 19:46:30 2017 -0700 python, client.py: Use the recommended style for comparing against None commit 6da39c460f621b6e8ba1ff343db5355a0ceaa97a Author: Bart Van Assche Date: Sat Apr 1 19:44:42 2017 -0700 python, client.py: Fix pylint warnings about import statements commit b6d6d81a794d7c4a1d1d8dfc832a59fa24c75786 Author: Bart Van Assche Date: Sat Apr 1 19:42:37 2017 -0700 python, client.py: Fix pylint warnings about whitespace commit ef1572659652335e4d5da925a85d70eb7a306f3c Author: Bart Van Assche Date: Sun Apr 2 09:20:33 2017 -0700 snmplib: Remove snmp_session.remote_port assignments commit 06bfd94bc00509146e84752065bd2669fc3bc828 Author: Bart Van Assche Date: Sun Apr 2 09:03:40 2017 -0700 snmplib: Mark snmp_session.remote_port as deprecated Ensure that the compiler issues a warning if a value is assigned to remote_port. This member has been deprecated a long time ago. commit 0336d11e91e345e65fe6101ae6242568984b479a Author: Bart Van Assche Date: Sun Apr 2 09:37:20 2017 -0700 Fix a recently introduced init_usmDHParameters() crash The pointer of which the address is passed to BN_hex2bn() must be initialized. See also commit 14bb72fd12bf. commit 14bb72fd12bf5b68662893f7d8afbc4a8d52a6c8 Author: Niels Baggesen Date: Sat Apr 1 07:55:47 2017 +0200 OpenSSL 1.1 fixes for SNMP-USM-DH-OBJECTS-MIB implementation. commit 17b6ff76e8bb51d55a73993de7e0560b94f85f8d Author: Robert Minsk Date: Thu Feb 9 16:00:04 2017 -0800 Python getnext method was allocating the return value twice commit 1cea00031cf964eee735888c81c00138bf3c807d Author: Bart Van Assche Date: Sun Mar 26 14:43:44 2017 -0700 apps/snmpusm: Fix recently introduced compiler warnings Avoid that the compiler warns about passing BIGNUM ** to a function that accepts const BIGNUM **. See also commit bbed6b86e70b5. commit 53002bc8e1eba1c7c92530586481f980a07617af Author: Bart Van Assche Date: Wed Dec 10 09:37:31 2014 +0100 Fix C language preprocessor directives The directive '#warn' is not a valid gcc preprocessor directive but '#warning' is. Hence change '#warn' into '#warning'. See also https://gcc.gnu.org/onlinedocs/cpp/Diagnostics.html. commit 142c4239771c6282d66a553d5692037c251a2f90 Author: Bart Van Assche Date: Thu Mar 23 21:09:55 2017 -0400 MIB-II: Fix /proc/net/snmp parser This commit fixes bug 2764 (https://sourceforge.net/p/net-snmp/bugs/2764/). commit bbed6b86e70b5a3c54f14992696f2308a8d79511 Author: Niels Baggesen Date: Wed Mar 22 14:49:06 2017 +0100 Initial support for OpenSSL 1.1 API changes. A slightly modified version from patch 1336, updated to work if you have LibreSSL. There is more work needed to handle TLSTCP and DTLSUDP transports. Thanks to Sharmila Podury. commit d5b10831e7153fe7e030e60a025058e46cb40439 Author: Bart Van Assche Date: Sat Mar 18 16:09:16 2017 -0700 ucd-snmp: Include if available Avoid that the following warning is reported: ucd-snmp/diskio.c:445:13: warning: In the GNU C Library, "major" is defined by . For historical compatibility, it is currently defined by as well, but we plan to remove this soon. To use "major", include directly. If you did not intend to use a system-defined macro "major", you should undefine it after including . commit 8c98bab640d047660e6a5d325a735d538748b56e Author: Bart Van Assche Date: Sat Mar 18 15:53:06 2017 -0700 unit test T008asn1: Add more test cases for decoding unsigned integers commit 639d172c31c8fa9ce7f8ed52a484599a9e23cd7b Author: Bart Van Assche Date: Sat Mar 18 15:59:55 2017 -0700 CHANGES: snmplib: BUG: 2768: Fix decoding of unsigned integers See also https://sourceforge.net/p/net-snmp/bugs/2768/. commit c22a25f34472d49f156760a006118e620aa44514 Author: Wes Hardaker Date: Thu Feb 23 06:51:11 2017 -0800 CHANGES: python: patch from David Hankins to fix python binding error codes commit ba253b629620bca4bbcc686d2388dda49962bdcb Author: Bart Van Assche Date: Fri Jan 27 20:10:46 2017 -0800 testing/check_for_pskill: Change shell from bash into sh /bin/sh is always available on Unix but /bin/bash not. commit d4527b786e3e42f18be4e7ededa89a2ff71e04be Author: Bart Van Assche Date: Thu Dec 15 10:33:58 2016 +0100 apps/sshtosnmp: Avoid that the compiler warns about an empty body in an if-statement commit 359b795ca57829c139eaf6e84ea9256c460bc48b Author: Niels Baggesen Date: Fri Jan 27 22:31:50 2017 +0100 swinst:pkginfo: memory leak fix from bug 2760. commit ae23f05669560a565ef6cb9734586163da0fb97b Author: Niels Baggesen Date: Fri Jan 27 22:28:45 2017 +0100 ipaddress_solaris.c: memory leak fix from bug 2760. commit 024faf415a4474a67a05638f34f6257e4e918746 Author: Niels Baggesen Date: Fri Jan 27 22:11:13 2017 +0100 Remove superfluous prototype from ip-mib/data_access/ipaddress.h (causing troubleson BSD) commit a77b1edecc512197eecedda385c2073be91cadde Author: Magnus Fromreide Date: Thu Jan 5 17:47:32 2017 +0100 Reduce stack usage Extract the outsized variable 'buffer' from the recursive _get_realloc_symbol function into a separate function in order to save stack space commit 962a38f4dffb9ae52843e1ac18e74b65e5fb3486 Author: Magnus Fromreide Date: Thu Jan 5 17:31:53 2017 +0100 Do not presume that srcdir equals the current working directory. commit 479c0b9edeae47dfe713c585f75d04428f5e84c3 Author: Niels Baggesen Date: Tue Dec 13 23:06:03 2016 +0100 Fix reference to interface-private.h from ipaddress_sysctl.c commit 6650697f7b8ddd86ffa6849dc63ee5f088896714 Author: Bart Van Assche Date: Tue Dec 13 17:28:43 2016 +0100 apps/snmpps: Use ncurses header file when linking with ncurses library This avoids that e.g. on an AIX system the compiler warns that no prototype is available for clear(). commit fd41dd00c977015f825a1c4445ceab36dc35fa77 Author: Bart Van Assche Date: Tue Dec 13 07:25:37 2016 +0100 snmplib/Makefile.in: Add netsnmp-attribute-format.h to INCLUDESUBDIRHEADERS commit 273fda3251e9a0fdfb1dad30344ea58ba68864e8 Author: Bart Van Assche Date: Tue Dec 13 07:24:15 2016 +0100 snmplib/Makefile.in: Sort filenames alphabetically commit 58816e051882ef852754901cd294b52f281cdc38 Author: Bart Van Assche Date: Sat Dec 3 21:06:54 2016 -0800 snmplib: Remove redundant NETSNMP_IMPORT Specifying NETSNMP_IMPORT is only necessary in header files but not in .c files. commit a31eaccdda704c309564ff2df81ab1ef1401b7a1 Author: Bart Van Assche Date: Fri Dec 2 21:31:33 2016 -0800 Move more declarations of global functions and variables from .c to .h commit 0161ba65e2e7573dd9d46a8e40c8c7044215ea28 Author: Bart Van Assche Date: Sat Dec 3 20:37:26 2016 -0800 Convert to ANSI C syntax commit 81b65f4d23a976d2106bbfc2262694c1c90f457c Author: Bart Van Assche Date: Fri Dec 2 21:31:33 2016 -0800 Move declarations of global functions and variables from .c to .h This allows the compiler to verify consistency of variable and function declarations for variables and functions that are used in more than one file. commit 09a42c954593f70a09cc1b1925dde40891b0ac0b Author: Bart Van Assche Date: Sat Dec 10 12:10:46 2016 -0800 HOST-RESOURCES-MIB: Provide Mark_HRSW_token() and Release_HRSW_token() as functions This patch does not change any functionality. commit 8faa636e683c0bdcf3ad79b13ee04b3c130fc189 Author: Bart Van Assche Date: Sat Dec 3 20:12:21 2016 -0800 Comment out unused functions 'grep' shows that these functions are not called from the Net-SNMP code base. commit f765ebd62045e337becef857c8d766a19ab1d132 Author: Bart Van Assche Date: Thu Dec 8 20:35:35 2016 -0800 Add -Wno-sign-compare to developer flags commit 87caf2bd7725fc8ae222c5b1d21730a15bbc6cea Author: Bart Van Assche Date: Thu Dec 8 20:53:34 2016 -0800 DISMAN-EVENT-MIB: Add missing parentheses Detected by sparse. commit 98c76567bc3f03c9913e50d1012e4223416a5b17 Author: Bart Van Assche Date: Thu Dec 8 20:56:04 2016 -0800 DISMAN-EVENT-MIB: Fix a syntax error See also commit 20ea4ec72672. commit 29e1d97403004adab0d9daec6c7aa59696367c3f Author: Bart Van Assche Date: Sun Dec 4 20:28:45 2016 -0800 agent/mibgroup/disman/traceroute/traceRouteCtlTable.h: Remove an unused declaration commit 6257dce9d5ca327265031b5d300370cd23d2ab17 Author: Bart Van Assche Date: Sat Dec 3 20:37:26 2016 -0800 Convert to ANSI C syntax commit ac918c1a98c5954f8089d28b3020874e77d94d9b Author: Bart Van Assche Date: Sat Dec 3 20:09:33 2016 -0800 pingCtlTable: Move two global variable definitions from .h to .c commit 38ab13fe1780f1fa24e9af23250c477074d421dc Author: Bart Van Assche Date: Tue Nov 8 22:37:53 2016 -0800 Remove unused variables commit de71e73e8aafeed3e98f84828b486360a5f38eba Author: Bart Van Assche Date: Fri Nov 11 18:47:53 2016 -0800 snmplib: Change the type of the second arg of se_read_conf() into const char * This allows to remove two NETSNMP_REMOVE_CONST() casts. commit dfd4493517431b4a0323199a65bb472e2afa5eac Author: Bart Van Assche Date: Tue Nov 8 22:39:54 2016 -0800 snmplib: Use logical or for booleans commit ae05eb5ad3bcdbff132665fcc556d858feb5937b Author: Bart Van Assche Date: Tue Nov 8 22:34:45 2016 -0800 Use NULL instead of 0 to represent a pointer commit c28ed52d23cd784cadbacbacff8230d1a2255962 Author: Bart Van Assche Date: Sun Dec 4 09:40:47 2016 -0800 Remove Emacs local variables Anyone who is using emacs should use dir-locals-set-class-variables and dir-locals-set-directory-class in the emacs startup file instead of adding local variables to every source file. commit d89ec41819909b2bb80d78abeae748ae8d62bebf Author: Bart Van Assche Date: Sun Dec 4 10:00:30 2016 -0800 SNMP-NOTIFICATION-MIB: Remove extraneous whitespace commit ffeaee67b287e034727c8aa828ed36092662a169 Author: Robert Story Date: Thu Dec 8 22:45:58 2016 -0500 version update for 5.4.5.pre2 commit 03984951b674e74687fff6f3df1b9978f4041794 Author: Robert Story Date: Thu Dec 8 22:42:53 2016 -0500 version update for 5.4.5.pre2 commit 24ab33a0a0798748957669cde374907ce5f37984 Author: Robert Story Date: Thu Dec 8 22:41:09 2016 -0500 make depend for 5.4.5.pre2 commit 78d42b4e3b9eac40759da601327a053eaaf3b967 Author: Robert Story Date: Thu Dec 8 22:28:11 2016 -0500 documentation update for 5.4.5.pre2 commit 0c32eea3e292a948d6973d4cb8df57e338fe3362 Author: Robert Story Date: Thu Dec 8 22:27:06 2016 -0500 Version number update: 5.4.5.pre2 commit 75e89633833446f48bbe016c155febcf3edaa72f Author: Robert Story Date: Thu Dec 8 22:23:18 2016 -0500 configure option to disable U64 typedef commit 0a0c5d02332023a212590e7d890b71d9fdcfbdbc Author: Robert Story Date: Sat Dec 3 22:30:30 2016 -0500 fix more printf format errors commit b153106a68f8ca28b961da1961ce7b4e50aa297e Author: Niels Baggesen Date: Thu Dec 8 06:58:53 2016 +0100 Add diskIOBusyTime to the UCD-DISKIO-MIB. commit 932645e8137a0ce4c8300303f4277ccdf809ffa6 Author: Niels Baggesen Date: Thu Dec 8 06:57:28 2016 +0100 Fix speling error in man page. commit 52a73dee0452559e2f6608dbeb343c661b7b5efa Author: Niels Baggesen Date: Thu Dec 8 06:55:36 2016 +0100 Fix the ifdefs around IP_RECVDSTADDR that some earlier patch broke. commit 09292500ae82331242da585fc748fdff5490a5ae Author: Niels Baggesen Date: Wed Dec 7 14:43:42 2016 +0100 Not all current OSes have compilers that support all developer flags. Validate them! commit 666920125cd261db9e5ae58f46fbb66ae7461e8c Author: Bart Van Assche Date: Sat Nov 5 18:09:29 2016 -0700 ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer See also commit ed4e48b5fab1. commit 1ae6ffa01c459cb82b63f2cd0b0a96f077091553 Author: Bart Van Assche Date: Sun May 17 10:46:56 2015 +0200 new DISMAN EXPRESSION MIB: Fix two compiler warnings commit 74dad55e7fcb50508af88bb6a68367d4ed42453f Author: Robert Story Date: Tue Nov 8 13:40:11 2016 -0500 fix compiler warnings commit e905cd373e784b03fbc4e6311fa2cd93705980bb Author: Bart Van Assche Date: Sat May 23 11:40:50 2015 +0200 snmplib, snmp_openssl: Add missing braces Detected by Coverity. commit 74cc95c317474ff14bbc6222b8fc8b537d3c312a Author: Bart Van Assche Date: Sun Dec 4 21:49:41 2016 -0800 deliverByNotify: Fix a compiler warning commit 31613e8b1eb7515ddc7cb89d72755a671c9c41f5 Author: Bart Van Assche Date: Mon Dec 5 18:29:18 2016 -0800 Do not define U64 typedef while building Net-SNMP The U64 typedef conflicts with a typedef in a Perl header file. Hence disable the U64 typedef from the Net-SNMP header files. This patch neither changes the Net-SNMP ABI nor the Net-SNMP API. commit 3df26802b258d93023f05ac0f1af889361b40fcd Author: Bart Van Assche Date: Mon Dec 5 19:10:59 2016 -0800 Avoid that linking fails with a C99 compliant compiler and optimization disabled The semantics of the C99 inline keyword differs slightly of that of the C++ inline keyword. See also http://stackoverflow.com/questions/16245521/c99-inline-function-in-c-file/16245669. commit 0fd0962d32b47ffa2f418cf31226c94541a5c2a5 Author: Bart Van Assche Date: Mon Dec 5 18:46:22 2016 -0800 configure: Display result of 'static inline' test commit a7b6cb4d1a55962e553f2f9ae465d6aab4709ff2 Author: Bart Van Assche Date: Mon Dec 5 20:28:14 2016 -0800 configure: Display rtentry structure type once commit 6d3ac9bf1e971d97daf154e978c74d9ef67b18db Author: Bart Van Assche Date: Sun Dec 4 21:49:41 2016 -0800 deliverByNotify: Fix a compiler warning commit e1409530f917f2608a19bcbb5dece279a16c11c2 Author: Bart Van Assche Date: Sat Dec 3 04:42:47 2016 +0100 configure: Add -Wno-unused-result to the developer flags commit 59eb61cdc3ffaf5980bde4193111b6f6d3fe61ef Author: Bart Van Assche Date: Sat Dec 3 04:32:34 2016 +0100 DISMAN-TRACEROUTE-MIB: Fix an error path Avoid that free(outip) can get called before outip is initialized. Detected by gcc. commit 3f758abeb91ccb4e57b795330e3f8c969956d6bc Author: Bart Van Assche Date: Fri Dec 2 19:53:47 2016 -0800 agent/mibgroup/examples/example.c: Make the code consistent with the v5.5 branch commit 7b505a457b6f4d8e748803728f0051e8e6765358 Author: Robert Story Date: Fri Dec 2 17:24:01 2016 -0500 fix printf without format string and compiler warning commit 933084b217b144ba302da9a410203919d9290186 Author: Bart Van Assche Date: Sat Nov 19 20:39:25 2016 +0100 CHANGES: BUG: 2701: Fix Perl module build on Fedora 23/24/25 Avoid that building the Perl modules fails as follows: cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] commit b898c729ec4df1ce6585deef68cc7db7d38f2749 Author: Robert Story Date: Wed Nov 30 21:46:35 2016 -0500 search for autoconf-$version too commit d23474c85b64500788545edf031b0a2168d3ddd5 Author: Bart Van Assche Date: Sat Nov 26 21:25:23 2016 -0800 win32/netsnmpmibs/Makefile.in: Add missing source files commit 475ad71b1bb96c4f7b1928e9006d3b95f2148876 Author: Bart Van Assche Date: Sat Nov 26 20:44:18 2016 -0800 Win32: Add a missing NETSNMP_IMPORT declaration commit 09f4350e95f28ece0bbc6205256e6dcd5b7ff40d Author: Bart Van Assche Date: Sun Nov 27 04:24:31 2016 -0800 Win32, snmp_debug.c: Fix Windows build MSVC does not have a header file. See also commit 5145942b7569. commit ee4effd7d2cceb950629c0066c15257093ecbfe1 Author: Bart Van Assche Date: Sat Nov 26 20:20:39 2016 -0800 Win32, snmp-lib: Fix sc_get_openssl_hashfn() declaration On Unix systems EVP_MD is an alias for struct env_md_st. On Windows systems EVP_MD is an alias for evp_md_st (Shining Light Productions OpenSSL v1.1.0c). Hence use EVP_MD in the scapi.h header file. commit 4040bf80ec19ebcebddddc5f8e14090d0540013d Author: Bart Van Assche Date: Sun Nov 27 09:09:45 2016 -0800 snmp_debug: Constify priority name array commit a98fe2204cbe43b2ec2f6863c4cfd68e6c5c15f8 Author: Bart Van Assche Date: Sun Nov 27 06:48:01 2016 -0800 snmplib, agent: Fix format strings Use % NETSNMP_PRIz instead of %l for size_t. Use %u instead of % NETSNMP_PRIz for int. Fixes e.g. commit e207b8113260. commit 413eb441c2f71298cd07ff0c480505ba62cad8bb Author: Bart Van Assche Date: Sun Nov 27 19:18:09 2016 -0800 MinGW: Ensure that pskill / pslist test is run before tests commit 27be45f22fc620ee0edf779550aa9c13039ca427 Author: Bart Van Assche Date: Sun Nov 27 13:16:01 2016 -0800 Win32: Make strcasecmp() declaration available to the compiler commit 1794aedb192a99b9f6871fa711fa76eb1187f919 Author: Bart Van Assche Date: Sun Nov 27 13:10:16 2016 -0800 Win32: Enable _WINSOCK_DEPRECATED_NO_WARNINGS commit fda421625d20d8f8201479fa7f33c257fdc72015 Author: Bart Van Assche Date: Sun Nov 27 11:25:40 2016 -0800 Cygwin: getnetent() / getnetbyaddr() build fix Recent versions of Cygwin have prototypes but no implementation for these functions. Hence avoid that the Cygwin prototypes conflict with the implementation. commit 77624ea7b9d44c7816d253750e201a23929141a6 Author: Bart Van Assche Date: Mon Nov 28 18:22:57 2016 -0800 UCD-SNMP MIB: Fix a link failure on systems without regex support Avoid that building with MSVC or MinGW triggers fails due to a missing init_logmatch() implementation. commit 79243158a5cb81731280f30abdbc3375e1061f5e Author: Bart Van Assche Date: Sun Nov 27 11:35:32 2016 -0800 UCD-SNMP MIB: Avoid integer overflows Certain 32-bit compilers, e.g. Cygwin-x86 gcc, use a 32-bit data type for unsigned long. Since 'val' must be 64 bits wide, change its data type from unsigned long into unsigned long long. commit 8b6f376a71d1745ffa85fa2490637dbb3c4d0012 Author: Bart Van Assche Date: Sun Nov 27 11:01:02 2016 -0800 snmpd: Rename VIEWSTATUS into VACMVIEWSTATUS The Cygwin header declares VIEWSTATUS as a typedef. Avoid that the Windows build fails by renaming the Net-SNMP VIEWSTATUS symbol. commit 87bae0e0241f353c7d8cd7a3f2847e760efb3712 Author: Bart Van Assche Date: Sun Nov 20 16:03:29 2016 -0800 CHANGES: BUG: 2737: Quote service executable path See also: * http://isc.sans.edu/diary.html?storyid=14464 * http://cwe.mitre.org/data/definitions/428.html * http://www.commonexploits.com/?p=658 commit 657b62eeca0968fdbd4e75b946bbaef5677d8b1b Author: Bart Van Assche Date: Sat Nov 26 20:39:32 2016 -0800 Win32: Add support for OpenSSL >= 1.1.0 In OpenSSL version 1.1.0 the libeay32 library has been renamed into libcrypto32. Hence update the name of the OpenSSL library. See also https://git.openssl.org/gitweb/?p=openssl.git;h=6928b6171ada. commit 2259a2331e3a191c721ff2a2583ad1263e1a0a60 Author: Bart Van Assche Date: Sun Nov 27 08:59:45 2016 -0800 Win32: Add Visual Studio 2015 version number Additionally, make net-snmp-config.h.in and net-snmp-config.h again consistent. See also commit 1fa4da1c6cf9. commit 9850be71ab9c8d228ea09fd11a22d6ef8ae496e2 Author: Bart Van Assche Date: Sun Nov 27 20:26:55 2016 -0800 Win32: Synchronize win32/net-snmp/net-snmp-config.h and .in commit cc700baaff3d81c72b82ac877f099e70591d5288 Author: Bart Van Assche Date: Sun Nov 27 20:24:05 2016 -0800 snmplib/winservice.c: Suppress a compiler warning Avoid that gcc complains about 'static' not occurring first. commit 9a66d1aad05e44aa118381f7bf055e87f646313e Author: Bart Van Assche Date: Sat Nov 26 20:44:18 2016 -0800 snmplib: Add missing NETSNMP_IMPORT declarations commit f54f7af2be992f1667684f17cf5fd2d6f3850715 Author: Bart Van Assche Date: Sun Nov 27 09:18:17 2016 -0800 snmplib: Fix asn_parse_nlength() prototype All callers pass an u_long pointer as third argument to this function. Hence change the type of the third argument from size_t into u_long. See also commit a9850f4445cf. commit 829cc646955fe529f5ce9cf02ce1391a47325045 Author: Bart Van Assche Date: Sat Nov 26 20:52:47 2016 -0800 snmplib: Unify printf format attribute definitions This change adds NETSNMP_ATTRIBUTE_FORMAT() to the global namespace and removes _LOG_ATTR() from that namespace. commit 920f20b745da6c90c56a68d6d1ea782ca4fc074b Author: Bart Van Assche Date: Sat Nov 19 20:39:25 2016 +0100 CHANGES: BUG: 2701: Fix Perl module build on Fedora 23/24/25 Avoid that building the Perl modules fails as follows: cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] commit d41eb3a765010792550706f48e04be0f0343555b Author: Bart Van Assche Date: Sat Nov 5 18:09:29 2016 -0700 ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer See also commit ed4e48b5fab1. commit a3c9a3b0188280c7a68948f3e0f6b5ab9a658a46 Author: Robert Story Date: Tue Nov 8 13:40:11 2016 -0500 fix compiler warnings commit 02de0a2bfcf49a8e1752a84f7977825a1df701a7 Author: Bart Van Assche Date: Tue Nov 15 18:17:06 2016 -0800 configure: Enable more developer compiler warnings commit cfe8da03ce1084e975f5560a86c85eaf50df0447 Author: Bart Van Assche Date: Tue Nov 15 18:15:55 2016 -0800 mibII: Swap 'static' and 'const' to keep gcc happy commit 32fa60a51fb52168d164d48d4461b6dc692e185f Author: Bart Van Assche Date: Tue Nov 15 18:14:26 2016 -0800 DISMAN-TRACEROUTE-MIB: Comment out dead assignments The value assigned to 'pmtu' is never used. Hence comment out the assignments to 'pmtu'. This avoids that gcc complains about these assignments. commit 0b325487af00c1bf282acfb877faab86b34f29e4 Author: Bart Van Assche Date: Sat Nov 19 08:34:22 2016 -0800 Make the code that handles msgMaxSize easier to read See also https://en.wikipedia.org/wiki/Yoda_conditions. commit 26b38e58112dc0dba9fbb4fb54f7b26d531cf355 Author: Bart Van Assche Date: Sat Nov 19 09:54:40 2016 -0800 Perl tests: Make test SNMP/t/session.t pass again The comment in perl/SNMP/t/session.t was not correct. Whether or not session creation succeeds does not depend on whether or not an SNMP agent is running at session destination address for the USM security model. See also commit f629d1224e22. commit 56287c139e5635e1bbafd2792fcfc7cbd59c9b57 Author: Robert Story Date: Wed Nov 16 23:12:03 2016 -0500 Perl: Initialize session objects correctly This is a fix for commit f629d1224e22. commit f629d1224e2272cb6f86dbe9bea4c88aec7e8f92 Author: Robert Story Date: Tue Nov 15 12:58:11 2016 -0500 better handling of pdu max message size; now per packet, not per session - add msgMaxSize to snmp_pdu struct - defaults to SNMP_MAX_MESSAGE_LEN, then shrunk as needed for transport max, incoming pdu max and user configured max - new netsnmp_max_send_msg_size() should be used to query user configured max. returns SNMP_MAX_PACKET_LEN if not set, and SNMP_MIN_MAX_LEN if configured value is less that required min (484) - add some missing snmp_sess_init calls - snmp_sess_add_ex now returns an error if session rcvMsgMaxSize and sndMsgMaxSize are not set. commit 4494781070001b37d03236b73479f43cab6e3e7b Author: Robert Story Date: Mon Nov 14 17:36:40 2016 -0500 only use one 'max packet size' constant (SNMP_MAX_PACKET_LEN) commit a7d3d54136c88a1d2eb335d3f7a2a2080f3c0142 Author: VMwareDev Randy Date: Wed Jan 7 09:42:10 2015 -0500 CHANGES: BUG: 2387: fixed memory leak when request id is 0 Signed-off-by: Robert Story commit 734f85551926234633a28cc6bc857e9fe2f509eb Author: Robert Story Date: Wed Nov 9 16:22:30 2016 -0500 add missing prefix macro commit c006781f769b1e1f22c33d0354cf4b24d963c4b6 Author: Robert Story Date: Wed Nov 9 16:21:50 2016 -0500 fix a few cleanup cases; remove redundant checks commit e73ca98000273e1fd62ed60d72b7d153355c93ab Author: Robert Story Date: Wed Nov 9 16:13:01 2016 -0500 fix some missed HAVE_X conversions commit cf543e97aafd98bdfc828ca2fea6829aeb7caf10 Author: Robert Story Date: Thu Nov 3 12:38:05 2016 -0400 fix return type fix some usm code that didn't merge properly with VMware patches commit afbd7b71d83dc7c59765466fdf69472f81c96fb1 Author: Robert Story Date: Tue Nov 8 13:40:11 2016 -0500 fix compiler warnings commit 7302c4da707920bbb327f4d23b0f9170fae76013 Author: Robert Story Date: Mon Nov 7 23:41:19 2016 -0500 use callback to unregister notifications - so apps linking to agent lib don't need mib libs commit 37c1bd0b9812ef7b71a09b5310a12b39bb4bdb8d Author: Robert Story Date: Mon Nov 7 23:12:14 2016 -0500 align function name with other public functions commit 72f1693ef41f4fba4dfdba28023a292cb28fb70a Author: Robert Story Date: Tue Oct 25 23:36:36 2016 -0400 more generic unregister function commit b549b4f064ba3123025050d3a0caf0553701df90 Author: Robert Story Date: Mon Nov 7 18:01:24 2016 -0500 fix byte order for ports - UDP got whacked by recent code rework (merged from an older release) - SSH was missed in the original fix commit f90d891c8f98b41cc46345dd27ae73e99afd5258 Author: Robert Story Date: Mon Nov 7 17:17:38 2016 -0500 Revert "T070com2sec_simple: Fix this test" This reverts commit 9b617e7b25a6119b20059db941f18f9ef7158bc6. - DNS resolution does work: - dig +short onea.net-snmp.org 8.8.8.8 127.0.0.1 - dig +short twoa.net-snmp.org 75.75.75.75 127.0.0.2 127.0.0.3 - old record (not under our control) can/did chance number of records: - dig +short www.google.com (as of today) returns 6 A records, not 1 commit 2a36c5763cd26c347439253f5035966d0d1c732d Author: Bart Van Assche Date: Sat Nov 5 19:37:37 2016 -0700 AgentX: Fix a use-after-free in subagent_shutdown() Avoid that Valgrind reports the following: Invalid read of size 8 at 0x55F48B4: remove_trap_session (agent_trap.c:310) by 0x560F871: subagent_shutdown (subagent.c:749) by 0x630D7F7: snmp_call_callbacks (callback.c:363) by 0x62C76B7: snmp_shutdown (snmp_api.c:944) by 0x4057D2: main (snmptrapd.c:1356) Address 0xa3c4130 is 0 bytes inside a block of size 488 free'd at 0x4C2C26A: free (vg_replace_malloc.c:530) by 0x62C992B: snmp_free_session (snmp_api.c:1904) by 0x62C9BFE: snmp_sess_close (snmp_api.c:1989) by 0x62C9CDD: snmp_close (snmp_api.c:2019) by 0x560F850: subagent_shutdown (subagent.c:747) by 0x630D7F7: snmp_call_callbacks (callback.c:363) by 0x62C76B7: snmp_shutdown (snmp_api.c:944) by 0x4057D2: main (snmptrapd.c:1356) Block was alloc'd at at 0x4C2B0BD: malloc (vg_replace_malloc.c:299) by 0x62C78FF: _sess_copy (snmp_api.c:1081) by 0x62C8061: snmp_sess_copy (snmp_api.c:1294) by 0x62C9367: snmp_sess_add_ex (snmp_api.c:1796) by 0x62C91B9: snmp_add_full (snmp_api.c:1731) by 0x560FEE3: subagent_open_master_session (subagent.c:869) by 0x5610350: agentx_reopen_session (subagent.c:951) by 0x560D351: subagent_startup (subagent.c:107) by 0x630D7F7: snmp_call_callbacks (callback.c:363) by 0x62F2B7D: read_configs (read_config.c:1072) by 0x62C743B: init_snmp (snmp_api.c:896) by 0x40509B: main (snmptrapd.c:1141) commit bcdc51b3f70f857b18f9dc356297b00a6026c0f2 Author: Bart Van Assche Date: Sat Nov 5 18:13:58 2016 -0700 Python: Avoid that the compiler complains about redefined symbols commit 579b23a35b02bc5f1e6cf8dc15c4e1a514f5e535 Author: Bart Van Assche Date: Sat Nov 5 18:13:44 2016 -0700 Perl, SNMP.xs: Avoid that the compiler complains about redefined symbols commit 9b617e7b25a6119b20059db941f18f9ef7158bc6 Author: Bart Van Assche Date: Sat Nov 5 18:09:50 2016 -0700 T070com2sec_simple: Fix this test Use existing DNS names instead of names that do not exist. This patch fixes commit c6cc9a1fd013. commit d3f834a9ca81365e28c69d09499973b124f3394d Author: Bart Van Assche Date: Sat Nov 5 18:09:29 2016 -0700 ETHERLIKE-MIB: Avoid that the compiler warns about freeing a const pointer See also commit ed4e48b5fab1. commit 24e52a0e66883eee34c7edb500a90352b86b6aff Author: Bart Van Assche Date: Sat Nov 5 17:18:47 2016 -0700 snmpSTDDomain: Initialize t->sock to -1 in netsnmp_std_transport() To improve consistency with other transport modules, initialize t->sock to -1 (invalid socket) instead of 0 (stdin). This patch does not change the behavior of netsnmp_std_transport() because either t->sock is overwritten or t is freed before this function returns. commit af63a7e218ef26eeec6b417d67e5b4e37d97fc80 Author: Bart Van Assche Date: Sat Nov 5 17:16:57 2016 -0700 snmpSTDDomain: Use symbolic names instead of 0 / 1 Use symbolic names instead of 0 / 1 to represent stdin / stdout. Use dup2() instead of dup(). commit 57bf213262ce2e4c65a6d3878ee2a428146d2170 Author: Bart Van Assche Date: Sun Oct 23 09:00:15 2016 -0700 snmpCallbackDomain: Remove redundant code Assigning -1 to t->sock just before either freeing t or overwriting t->sock is superfluous. Hence remove the statement "t->sock = -1". Since comparing t->sock with -1 after rc has been tested is redundant, remove that comparison too. See also commit ae744544ca49 ("minor tranport cleanup"). commit 93d1099c8fb6015b105ea6ae4926dab2b8f4a6a1 Author: Bart Van Assche Date: Sun Oct 23 08:06:20 2016 -0700 Rerun autoconf commit 15b66acde89563469997001968bbddd089feb70a Author: Bart Van Assche Date: Sun Oct 23 08:11:20 2016 -0700 configure.d/config_os_libs2: Fix a comment commit a4c5c7674cc9a1ba2fba76e63e07d399cbc4bbf5 Author: Robert Story Date: Wed Nov 2 13:35:45 2016 -0400 use 'goto fail' for cleanup instead of repeating code 24 times commit e3d525e46a3f75cba6371857e1bce362aae9d0fd Author: Robert Story Date: Wed Nov 2 13:33:25 2016 -0400 rework some code in usm_create_usmuser commit 9bb701626da99ee80cdf3ae6542ccefe3c1dc196 Author: Robert Story Date: Wed Nov 2 13:31:06 2016 -0400 fix some usm code that didn't merge properly with VMware patches commit 4e0467a9d5dfad244c36f4bf2020471c9d825077 Author: Robert Story Date: Tue Nov 1 14:49:45 2016 -0400 check malloc returns commit b05b16fa22f91de00c46150a96b3c75bdecedd75 Author: Robert Story Date: Tue Nov 1 13:48:59 2016 -0400 add missing set of log parameter commit 05a9ee73350e9d04662c83a90bc782f7b617cb87 Author: Robert Story Date: Tue Nov 1 10:31:17 2016 -0400 fix potential deref of freed ptr introduced in commit 9bce2c951 commit 82d768b7de27c99df107739211f3d91bdcdda561 Author: Robert Story Date: Sun Oct 23 22:37:24 2016 -0400 initialize stack var commit 3533da310f4c108894cef00b9f2dce4f5f4c511a Author: Niels Baggesen Date: Mon Oct 17 22:24:13 2016 +0200 Remove redundant extern declaration. commit 8e3174999fd956c66f334ee2a2f4a5283799c2af Author: Niels Baggesen Date: Mon Oct 17 20:33:35 2016 +0200 Don't mix code and data. commit 009017e2a2167379b24df7f5e444fdfae4bd0a9d Author: Niels Baggesen Date: Mon Oct 17 20:32:40 2016 +0200 stdout could be a macro. Don't use it in a parameter list. commit fd242c01476749e009b3e64f399e91595c08820b Author: Niels Baggesen Date: Mon Oct 17 20:31:47 2016 +0200 Fix a duplicated semicolon. commit 39b8cf55d4cc82c64f0051aa04e64022c9062da0 Author: Robert Story Date: Mon Oct 17 11:21:17 2016 -0400 fix typo commit f217412fae322b6da6ea8c43f638b40be0e5cb98 Author: Robert Story Date: Sat Oct 15 14:55:58 2016 -0400 Bump LIBCURRENT for 5.8 release - Not that 5.8 is due anytime soon, but leaving it at 5.7 value could caues issues for systems with multiple releases installed commit 581df320d4407b1546f4b893c79db2be24de7794 Author: VMwareDev Randy Date: Wed Jun 22 17:20:12 2016 -0400 update net-snmp-create-v3-user.in for new SHA-2 algorithms Signed-off-by: Robert Story commit 96e4749ecbc056c68f72bbfe2857f8073a1cbd12 Author: VMwareDev Randy Date: Wed Jun 22 17:15:09 2016 -0400 fix more compiler warnings Signed-off-by: Robert Story commit ad15bd15ec65c34cd370b3fb51368baafc3e8a94 Author: VMwareDev Randy Date: Wed Jun 22 15:35:21 2016 -0400 fix sha-2 auth types to match help text; update man pages Signed-off-by: Robert Story commit 114d8426600f931dc70f87438a3c7b87b8cf24c9 Author: Robert Story Date: Thu Oct 13 21:04:24 2016 -0400 add VMware copyrights commit 30384f032e1829a50e28cf81282893a4b7544f85 Author: VMwareDev Randy Date: Sat Jun 4 17:40:26 2016 -0400 delete duplicated var decl Signed-off-by: Robert Story commit 0ea7638e5cbcfa10b9fc7dc34245671b030cb9cd Author: VMwareDev Randy Date: Sat Jun 4 17:33:05 2016 -0400 ifdefs for code/variables only needed in certain cases Signed-off-by: Robert Story commit 94edfbf2b7064f473b615d1c67742c1dfdb10eee Author: VMwareDev Randy Date: Tue Apr 14 14:24:16 2015 -0400 cleanup transport filters on shutdown Signed-off-by: Robert Story commit 2d69a5c09c20bb6af54d3a6eda585b7b1080d836 Author: VMwareDev Randy Date: Thu Apr 16 11:37:48 2015 -0400 fix more compiler warnings, typos Signed-off-by: Robert Story commit 1f80a2f5b0adc68268c3d1487efcd548fcb86cdb Author: VMwareDev Randy Date: Fri Apr 3 22:19:15 2015 -0400 various fixes noticed while reviewing Fortify issues - typos Signed-off-by: Robert Story commit cfe8828ed0570634e738b5ef6fd2b6da191b857c Author: VMwareDev Randy Date: Fri Apr 3 18:26:42 2015 -0400 address Fortify memory leaks Signed-off-by: Robert Story commit 700c0030ec7384fef2ba26114281ad657fe1b705 Author: VMwareDev Randy Date: Mon Mar 23 13:47:58 2015 -0400 fix fortify issues - null deref Signed-off-by: Robert Story commit 304edcc6858801384591f57f88794653f8813cef Author: VMwareDev Randy Date: Fri Apr 3 22:20:06 2015 -0400 new snmp_session_insert to insert sessions with lock - reducing duplicated code Signed-off-by: Robert Story commit 78c8f410ab61ee52adbd8eab2f7159980729bc92 Author: Robert Story Date: Thu Oct 13 13:43:42 2016 -0400 add range check; init vars to keep compiler happy commit c912c8f62bd4cc2a5f2f0787c79e9253dae920b0 Author: Robert Story Date: Thu Oct 13 13:41:34 2016 -0400 fix some compiler warnings commit 7954590aee91ab48edb2bc1ee7c6c610518a49a0 Author: Robert Story Date: Wed Oct 12 17:51:48 2016 -0400 restore unnecessary var init to keep compiler happy commit 9a8509f35c3828c6c0ba15721e81220546cbf7ef Author: Robert Story Date: Thu Oct 13 13:46:31 2016 -0400 add VMware copyrights commit a5661f32308447da7a4bdfb836d5b215bc5e8b93 Author: VMwareDev Randy Date: Thu Jun 25 16:53:00 2015 -0400 pdu stats tweaks - move pdu stats dump to function - move pdu stats shutdown inside pdustats ifdef Signed-off-by: Robert Story commit 3295f4d7fb9bfede1f95bae7060f6bb0a62e0a14 Author: VMwareDev Randy Date: Thu Jun 25 12:20:03 2015 -0400 change debug token to stats:notif Signed-off-by: Robert Story commit cd5174ac69f9bc9f321f5b02de9502744f6a3f01 Author: VMwareDev Randy Date: Mon Jun 22 22:26:31 2015 -0400 track trap/inform stats per session - new snmp_sess_lookup_by_name to find trap/inform session by name Signed-off-by: Robert Story commit b7b50bbac7f21a924149d03da26ff0a44b25ec60 Author: VMwareDev Randy Date: Mon Jun 22 22:20:43 2015 -0400 snmp_send callback updates - add new NETSNMP_CALLBACK_OP_RESEND - add missing calls for NETSNMP_CALLBACK_OP_SEND_FAILED Signed-off-by: Robert Story commit 775709de52a106783e625772c2ef7ccb0a173e6e Author: VMwareDev Randy Date: Wed Jun 17 17:41:24 2015 -0400 stats to track pdu processing times - keep the last N pdus with longest processing time Signed-off-by: Robert Story commit c3e92d6ca7cc080cda70b4f0dd51ef3eaf445327 Author: VMwareDev Randy Date: Thu Jun 18 14:13:54 2015 -0400 binary array container code redux Signed-off-by: Robert Story commit 220f3107e32abe277befc0039002849def8c3cd9 Author: VMwareDev Randy Date: Thu Jun 18 14:13:23 2015 -0400 immediately sort binary array when unsorted flag cleared Signed-off-by: Robert Story commit 734914361f6962a0a24b4902cfea9d7b94cfc380 Author: VMwareDev Randy Date: Wed Jun 17 17:37:32 2015 -0400 implement direct access methods for binary arrays Signed-off-by: Robert Story commit 871610a0dad503f9ce1d1f2db7817a05d6798de2 Author: VMwareDev Randy Date: Wed Jun 17 17:37:00 2015 -0400 add direct access methods to container - CONTAINER_INSERT_BEFORE(), CONTAINER_GET_AT(), CONTAINER_REMOVE_AT() Signed-off-by: Robert Story commit 6c61442b3a0704ffaa71d216ea565021ee102701 Author: Bill Fenner Date: Thu Oct 6 17:11:56 2016 -0700 only bind if an address is given The equivalent commit for v4 was 9d2c6f44e2bdc3fee8a090f64d936f035f3f42aa but it was missed for v6, meaning v6 clients were broken. commit c7c7610a39790aa67664ba8f05fd1e3924040dff Author: VMwareDev Randy Date: Mon Mar 23 13:49:46 2015 -0400 fix inverted logic in conditional Signed-off-by: Robert Story commit 5426f71503df6f0ef6abcf3d1a52483444217262 Author: VMwareDev Randy Date: Fri Mar 6 10:27:30 2015 -0500 simplify some filter code Signed-off-by: Robert Story commit fff5f7c9ce464cf50c33c69292d8ce916347e153 Author: VMwareDev Randy Date: Sat Feb 14 16:13:01 2015 -0500 add missing protocol check Signed-off-by: Robert Story commit 46da28b63fe6ad02c23dcc8d62639aa934ba2b04 Author: VMwareDev Randy Date: Mon Feb 2 10:38:37 2015 -0500 new netsnmp_vacm_simple_usm_* Signed-off-by: Robert Story commit 76917bd12616eeb6ac1f1462b341273463bf309b Author: VMwareDev Randy Date: Mon Mar 23 16:26:50 2015 -0400 fix rc check for new function Signed-off-by: Robert Story commit a6fa419be4155e08fe8ec1e2f7c4b32c309536f9 Author: VMwareDev Randy Date: Mon Mar 23 12:43:04 2015 -0400 new netsnmp_agent_listen_on to open agent port Signed-off-by: Robert Story commit 7ffb8e25a0db851953155de91f0170e9bf8c457d Author: Robert Story Date: Thu Oct 6 10:43:10 2016 -0400 CHANGES: BUG: 2743: snmpd crashes when receiving a GetNext PDU with multiple Varbinds skip out-of-range varbinds when calling next handler commit 17d5591889a2fda665b1891f6f496bfa06e58c70 Author: Robert Story Date: Thu Oct 6 07:49:10 2016 -0400 add VMware copyright commit 0ab749ad34831f403861494b9c981c5f7ac92feb Author: VMwareDev Randy Date: Tue Apr 14 14:15:33 2015 -0400 set_exact_engineID: return length error instead of truncating - do truncation in exactEngineID_conf for backwards compatability Signed-off-by: Robert Story commit 85ca9164418c3e993a8a3f63994bf5149e723c67 Author: VMwareDev Randy Date: Tue Feb 10 17:25:52 2015 -0500 add set_exact_engineID() - also fixes a potential silent truncation of an exact id Signed-off-by: Robert Story commit 7f05103fcc67b1d36337e5b39b813541979e51aa Author: Robert Story Date: Wed Oct 5 21:21:44 2016 -0400 add debugLogLevel to snmp.conf man page commit b3ee47b3966834fb138c97f152ffdb7e56032171 Author: Robert Story Date: Wed Oct 5 21:10:30 2016 -0400 debug tweaks - validate value in range when setting level - use our own table if no prioritynames (no numeric levels) - case-insensitive compare commit ed41f787b1229814dc23a0d6ad30889d0e93924a Author: Robert Story Date: Wed Oct 5 21:02:55 2016 -0400 re-run autoconf commit 3eb4b473fed816108d1843dadee1ce877415b96b Author: VMwareDev Randy Date: Tue Apr 14 14:21:36 2015 -0400 add debug_enable_token_logs debug_disable_token_logs to output_api.h Signed-off-by: Robert Story commit 5a98a96f6181bfe906d602dfbfe0b57abf5f7d35 Author: VMwareDev Randy Date: Fri Mar 27 12:36:40 2015 -0400 debug indent tweaks - add prototype for debug_indent_reset - assert on negative indent - fix typo Signed-off-by: Robert Story commit 5145942b75697f4cea9656041af2fcc877ac9bf5 Author: VMwareDev Randy Date: Wed Feb 4 13:45:37 2015 -0500 syslog facility parsing, using prioritynames if available Signed-off-by: Robert Story commit 3088f6a246efa042c2c887cd73d81ee740dd161e Author: VMwareDev Randy Date: Wed Feb 4 13:45:14 2015 -0500 configure tests for sys/syslog.h and prioritnames Signed-off-by: Robert Story commit 53e11928ee128a459ceb99aeb89ac7a5afcbde9d Author: VMwareDev Randy Date: Wed Jan 7 23:17:55 2015 -0500 use dynamic debug log level in xdump() Signed-off-by: Robert Story commit 16f034eff89b28f3b685cb2a622c32941d2eccb5 Author: VMwareDev Randy Date: Wed Jan 7 23:03:00 2015 -0500 new api/config token for dynamic debug log level - e.g. debug messages can be logged at LOG_NOTICE instead of LOG_DEBUG Signed-off-by: Robert Story commit 7cfec0d6a9fb7846e81f2edb4315b6f9c200eec9 Author: VMwareDev Randy Date: Wed Jan 7 10:07:38 2015 -0500 new netsnmp_register_filelog_handler some code reuse and moves implementation details out of argument processing. Signed-off-by: Robert Story commit 106c2e64626c0301230062779f92e0dc470f20c3 Author: VMwareDev Randy Date: Wed Jan 7 10:04:40 2015 -0500 new netsnmp_register_stdio_loghandler for both stderr and stdout Signed-off-by: Robert Story commit 72065914a684d763933ea0dbe89ebb563699838d Author: VMwareDev Randy Date: Mon Dec 1 13:56:09 2014 -0500 configure option enable-daemons-syslog-as-default Signed-off-by: Robert Story commit 9db9d1b3c625b5efa9e0cd0a8ff6ae8f535821b7 Author: VMwareDev Randy Date: Wed Jan 7 10:02:02 2015 -0500 move transport filter token registration later - fixes segfault in apps Signed-off-by: Robert Story commit f0bdaf03c69b053c807c212e2102c2b355e21e33 Author: VMwareDev Randy Date: Wed Nov 26 11:19:21 2014 -0500 make source address filter configureable: whitelist or blacklist Signed-off-by: Robert Story commit 9d28612ac03b1bd16ccaf12627e9e1eff0ce8cef Author: VMwareDev Randy Date: Tue Nov 25 23:32:10 2014 -0500 add packet filtering by source ip Signed-off-by: Robert Story commit ae744544ca4925869384da312f9629c0fc431115 Author: Robert Story Date: Wed Oct 5 00:03:24 2016 -0400 minor tranport cleanup - use netsnmp_transport_free() instead of SNMP_FREE - add some missing netsnmp_transport_free() calls commit fc6a91a8602f6c256c013afe741f31c7db5286d8 Author: Robert Story Date: Tue Oct 4 23:54:35 2016 -0400 fix systemd integration in UDPIP v4/v6 reorg commit 58e472b488264ca5ed07dfb7a24cc2469f99b8f0 Author: Robert Story Date: Tue Oct 4 23:52:58 2016 -0400 tweak netsnmp_sd_find_*_socket return - use -1 as 'not found', since 0 can be a valid socket (even if systemd would never use it. commit 9bbb0c54ce372a4bd0201f32d9ba8386b31d11b9 Author: Robert Story Date: Tue Oct 4 22:31:07 2016 -0400 free the right pointer commit e207b8113260fd7d84df0ebdb66925ab70da29b2 Author: Robert Story Date: Tue Oct 4 22:22:29 2016 -0400 tweak sndMsgMaxSize handling - account for oversized oid on 64 bit systems commit 614f21e12394e5c8a103816014f8f76267e56913 Author: Robert Story Date: Tue Oct 4 18:02:24 2016 -0400 Add VMware copyright Signed-off-by: Robert Story commit bb4f9f92a70eade9155137282df47d6d3e282c42 Author: VMwareDev Randy Date: Thu May 14 17:44:50 2015 -0400 move v3 engineID probe into initial packet build Signed-off-by: Robert Story commit 390986d4868f5db7f0fe73e329f8cd8b525b9a4e Author: VMwareDev Randy Date: Mon Apr 27 00:24:42 2015 -0400 getbulk enhancements: response size + fallback to forward encoding - only check reverse encode default store flag once per packet, setting pdu msg flag for forward encoding if reverse encoding is not configured. - track rough response sizes as we go, so we can stop gathering response varbinds we probably won't be able to send - if initial reverse encoding results in a packet that is too big, set pdu flags to retry with forward encoding and drop varbinds so that response fits in packet size - new private asn type to indicate encoding processing should stop - move duplicated packet building code to new netsnmp_build_packet() - new buffer ptr/len in agent isp struct for outgoing packet - new _build_initial_pdu_packet() to build a response packet (saving result in new isp struct ptr/len). this function is called by the agent to build the response *before* snmp_send is called, so we can a) detect tooBig errors and b) so we can fix getbulk processing by detecting bulk responses that exceed max snd msg size and switching to forward encoding with varbind truncation. - add ':intermediate' to intermediate results debug tokens Signed-off-by: Robert Story commit 9fe3ae172dcf2950db764394728cdbe26dfe4855 Author: VMwareDev Randy Date: Sun Apr 26 23:20:22 2015 -0400 reduce session msg max sizes to transport max Signed-off-by: Robert Story commit cc1c1f93e2566276ce7353e4ee49b466be8a2793 Author: VMwareDev Randy Date: Sun Apr 26 23:16:54 2015 -0400 getbulk enhancements: limit responses gathered - new avgBulkVarbindSize default store integer - use session sndMsgMaxSize & avgBulkVarbindSize to reduce maxresponses - tweak some debug tokens, adding ':bulk' Signed-off-by: Robert Story commit 1a0dbe19bf2787bb5bea913f210a9a5eb4c0c80c Author: VMwareDev Randy Date: Fri Apr 17 12:01:16 2015 -0400 new snmp token sendMessageMaxSize Signed-off-by: Robert Story commit b3bbde9b47b4aa5ef69e4116b2b5314ef0b4f209 Author: Robert Story Date: Tue Oct 4 13:11:51 2016 -0400 Add VMware copyrights commit 7d82f92240055a9eb1a8a53bb081e90e6abe182c Author: VMwareDev Randy Date: Tue Apr 14 14:22:11 2015 -0400 add runtime checks for disabled protocols to _snmp_build Signed-off-by: Robert Story commit 9fe699a1b7dd63c3644011f08584aabbfa5ed60f Author: VMwareDev Randy Date: Mon Mar 23 12:52:47 2015 -0400 no informsink if v2c & v3 disabled Signed-off-by: Robert Story commit 4b62edbdb32016b845e5dd14582f403f1659300f Author: VMwareDev Randy Date: Tue Mar 10 13:33:51 2015 -0400 log protocol version in hex Signed-off-by: Robert Story commit 32a321ff71db8b3cea472e2a5f08d56af7ae10e1 Author: VMwareDev Randy Date: Tue Mar 10 13:03:50 2015 -0400 fix runtime protocol check macros Signed-off-by: Robert Story commit 918d6a2d89e9a68729eb474e3e720829bdbc1a04 Author: VMwareDev Randy Date: Tue Feb 10 11:24:45 2015 -0500 update man pages Signed-off-by: Robert Story commit 4ec103c7dbbd165f8e41373dfc1057181d3d3414 Author: VMwareDev Randy Date: Tue Feb 10 11:02:06 2015 -0500 add debug, warn at startup if all protocols disabled Signed-off-by: Robert Story commit 96554150efccece58a3265cdfe1b21abd9f73603 Author: VMwareDev Randy Date: Mon Feb 9 18:55:59 2015 -0500 more runtime protocol version checks Signed-off-by: Robert Story commit e422fbfb09cd7a7927d02deb35f890a84f351691 Author: VMwareDev Randy Date: Fri Jan 2 00:26:08 2015 -0500 more checks for disabling protocol versions at runtime Signed-off-by: Robert Story commit 79aa24844b00c2922d19843b05ea1521f2b9b956 Author: VMwareDev Randy Date: Tue Nov 25 20:06:50 2014 -0500 add runtime support for disabling individual protocols Signed-off-by: Robert Story commit 3a7e096473b1576f4cce50945e1b28658f8909ba Author: Robert Story Date: Mon Oct 3 20:18:37 2016 -0400 Add VMware copyrights commit 3fb946129cb6a041c08971796f31363b4016fe70 Author: VMwareDev Randy Date: Mon Oct 3 18:31:45 2016 -0400 finish data/mib separation for snmpNotifyFilterProfileTable Signed-off-by: Robert Story commit 58ae9e6b11d8586528249c3a5b62ad221e91f67b Author: VMwareDev Randy Date: Mon Oct 3 16:53:22 2016 -0400 update all notification tables to handle embedded nulls in names Signed-off-by: Robert Story commit 3c6b768d34194c5f2eafe2cac5ed9d65c9ea5b0f Author: VMwareDev Randy Date: Thu Sep 29 15:01:24 2016 -0400 new netsnmp_memdup_nt (allocs extra byte for null termination) - very similar to netsnmp_strdup_and_null, but ... - always adds extra byte/null Signed-off-by: Robert Story commit 1c133c80ec0f69ff89f1925b65ad1ce06bfd0e2e Author: VMwareDev Randy Date: Mon Sep 26 13:31:48 2016 -0400 fix missed structure member renames Signed-off-by: Robert Story commit 8964bafcd6d6b7ffe115980d4f13c0946a32a53c Author: VMwareDev Randy Date: Mon Sep 26 13:30:42 2016 -0400 fix config_requires for notification data changes Signed-off-by: Robert Story commit 62a454fe7c138e6d252321057fd988a309a7ea15 Author: VMwareDev Randy Date: Mon Sep 26 13:30:11 2016 -0400 notification fixes - move store functions into data handlers - fix code for write support - skip duplicate init calls Signed-off-by: Robert Story commit cbef1e426e8be5564c2edf7565e8e0105c47d8b7 Author: VMwareDev Randy Date: Sat Jun 4 17:34:20 2016 -0400 more fixes for snmpTargetAddreEntry merge Signed-off-by: Robert Story commit 4a4bf1d2f8346d0c1cf33fe67bc515905245ad61 Author: VMwareDev Randy Date: Sat Jun 4 17:33:05 2016 -0400 import a bunch of non-cmake fixes from cmake branch - ifdefs for code/variables only needed in certain cases Signed-off-by: Robert Story commit 3aa4abeb737b97d02ec3a67327aa16dae3c152b0 Author: VMwareDev Randy Date: Thu Jun 2 12:54:03 2016 -0400 remove duplicated code/defines form snmpTargetAddrEntry bad merge? Signed-off-by: Robert Story commit c54d4a140c49f4e5f337893a93d469f793c55335 Author: VMwareDev Will Date: Thu Mar 19 22:15:49 2015 -0700 change a struct name so it doesn't conflict with another identical name Signed-off-by: Robert Story commit 61ac63fa6ee668cb873c633b84bdd873d9baab1d Author: VMwareDev Randy Date: Tue Apr 14 14:20:48 2015 -0400 add missing error handling in notifyTable Signed-off-by: Robert Story commit cd66a37276aa4e736947e0629b296f2ca5fff3c4 Author: VMwareDev Randy Date: Tue Apr 14 14:13:22 2015 -0400 use constant for max notification name len Signed-off-by: Robert Story commit 6b4ce3ecc1f16de90e8c13d4b49f42736d670535 Author: VMwareDev Will Date: Wed Mar 23 23:19:45 2016 -0700 remove C++ comments Signed-off-by: Robert Story commit 8b8e73942cfffeb82c0e328c4d0e975f399e0a77 Author: VMwareDev Randy Date: Fri Apr 3 18:26:42 2015 -0400 address Fortify memory leaks Signed-off-by: Robert Story commit b899c804eed3eb4024e70c241904d39b0a14075a Author: VMwareDev Randy Date: Sat Feb 14 15:44:52 2015 -0500 fix whitespace, typos; remove old warning Signed-off-by: Robert Story commit 966d9dbe85ebc2ff1ae6f13d6b69ed2385bb51ca Author: VMwareDev Randy Date: Sat Feb 14 15:44:08 2015 -0500 fix compiler warnings - unused var/functions - add const where possible Signed-off-by: Robert Story commit 0bc5e42d48533f179cf6eef4a086b9bca45488f5 Author: VMwareDev Randy Date: Mon Feb 9 10:38:05 2015 -0500 add-trap callback tweaks - add rc to callback args struct so callers knows success/failure - change netsnmp_create_notification_session to return session, and rename it to netsnmp_create_v1v2_notification_session and make public Signed-off-by: Robert Story commit a16b1327659e064d6c21ba1fe40b7f186f662c6a Author: VMwareDev Randy Date: Mon Feb 9 10:22:24 2015 -0500 add cleanup on shutdown, fix feature stuff, misc code cleanup Signed-off-by: Robert Story commit e2f86edfca88b3f68ddf5512f49132f6c9637d0b Author: VMwareDev Randy Date: Sat Jan 24 10:42:03 2015 -0500 allow trap sinks to set name, tag, profile Signed-off-by: Robert Story commit f770e0f7493204f184c468a7c4dba31f0cd6fc5d Author: VMwareDev Randy Date: Fri Jan 23 13:47:43 2015 -0500 skip send_trap callbacks if no sessions for version Signed-off-by: Robert Story commit de8bc3c2d4acf9d276a2060f627fbc5ea0824415 Author: VMwareDev Randy Date: Fri Jan 23 08:58:10 2015 -0500 separate notification storage from MIB implementation Signed-off-by: Robert Story commit cdbfb179b223c4bd76951ffad773206c82922941 Author: VMwareDev Randy Date: Fri Jan 23 13:46:03 2015 -0500 new netsnmp_build_trap_oid() to build v2 snmpTrapOID for v1 traps Signed-off-by: Robert Story commit b7a910c08d7fef13b554555b1e19bd9a7974e557 Author: Niels Baggesen Date: Wed Sep 21 20:49:59 2016 +0200 Correct check for IP_PKTINFO to make it work for Solaris and NetBSD 7. commit a0d5c8a1010aeb74f47ee74a4efa6b61b053b161 Author: Robert Story Date: Wed Sep 21 09:53:42 2016 -0400 remove transport deprecated warning commit 7a956be442f1b27143f1abb5c9e68756ef1bed3a Author: Niels Baggesen Date: Wed Sep 21 07:37:46 2016 +0200 Fix IPv6 transport after recent updates. commit bf27cfca01580950c5e0642d60aff490f95f3791 Author: Bill Fenner Date: Mon Sep 19 07:07:36 2016 -0700 The struct is actually netsnmp_container_s. change 60f97905 introduced a forward declaration of "struct netsnmp_container", but the struct in container.h is "struct netsnmp_container_s", and "netsnmp_container" is a typedef. This means that code that includes both snmp_transport.h and container.h won't compile. commit fd3cf7ca6ae9a8052a76d93401ce2640e67f43e5 Author: Magnus Fromreide Date: Sun Sep 18 23:04:01 2016 +0200 Remove empty statements. commit 9e873b1a465c26623478bf9f3cb4ea661ba1b999 Author: Magnus Fromreide Date: Sun Sep 18 00:56:04 2016 +0200 Remove a spurious semicolon among the variable declarations as that empty statement ends the variable declaration part of the function in c89. commit 25c0b8660b62b2cc0b6f0492e2284c1d0c792ca7 Author: Robert Story Date: Fri Sep 16 12:34:57 2016 -0400 add VMware copyright notices commit c49d43ed8bdbf454821322a45a52b5ccd97a7f4d Author: Robert Story Date: Fri Sep 16 11:28:47 2016 -0400 add missing test for sha2 support commit 39fe4f07df7d3a0a696fec43ce57896fd7c2249f Author: VMwareDev Randy Date: Thu May 14 17:42:38 2015 -0400 common parsing for snmpv3 options Signed-off-by: Robert Story commit c00b662b21c104b47bf730068c1e271878d4278e Author: VMwareDev Will Date: Wed Mar 25 15:40:41 2015 -0700 fix typo in new usm/Ku code Signed-off-by: Robert Story commit 6cad7a4385678a2f4a3a3e1894a8ceaf3990e9b7 Author: VMwareDev Randy Date: Sun Mar 22 22:09:36 2015 -0400 check user flag for saving kukey Signed-off-by: Robert Story commit ef1e2bf427a86feada4849f1f409a6b2cbcb3810 Author: VMwareDev Randy Date: Thu Sep 15 22:26:25 2016 -0400 add src to v3 notif sess, save engineID in sessions - use tspec for transport creation Signed-off-by: Robert Story commit cce5bba0062a8dbf1335a4c04280ebf2bb8bda00 Author: VMwareDev Randy Date: Thu Sep 15 22:54:01 2016 -0400 add usmUser flags field Signed-off-by: Robert Story commit cebd7ba90ccaa97ddf23e0667d5a6f1336d26a83 Author: VMwareDev Randy Date: Wed Sep 14 16:44:39 2016 -0400 tweak usm error handling - use more specific message if available - free user on any error Signed-off-by: Robert Story commit 8687db38672f8088b919798a3adb25478c04199d Author: VMwareDev Randy Date: Thu Sep 15 23:06:21 2016 -0400 use saved master key instead of localized key - also copy, not dup Signed-off-by: Robert Story commit 41dc4896fb3ffbb4726f5e8bcdb3b79d8fd66ed6 Author: VMwareDev Randy Date: Wed Sep 14 17:02:55 2016 -0400 keep master keys in usm structure Signed-off-by: Robert Story commit 18c43633249fa3bde6bd96ae7e95fdec875c176b Author: VMwareDev Randy Date: Wed Mar 18 09:15:17 2015 -0400 add engineId to netsnmp_create_v3user_notification_session Signed-off-by: Robert Story commit 4641464b4ec21a39c5d1a9b5976434b192a4bf2c Author: VMwareDev Randy Date: Thu Sep 15 22:13:27 2016 -0400 netsnmp_create_v3user_notification_session Signed-off-by: Robert Story commit df26f8f2d51409827a3ce131c1b9de67d01ee6e5 Author: VMwareDev Randy Date: Thu Sep 15 23:16:53 2016 -0400 add source addr/port option to trapsink/trap2sink/informsink Signed-off-by: Robert Story commit 6b7350749490dc38709053331f3c83799d03ca6a Author: VMwareDev Randy Date: Thu Sep 15 23:21:37 2016 -0400 allow trap sinks to set name, tag, profile Signed-off-by: Robert Story commit 24d3e8714d73e0f914e823943f147038d896602a Author: VMwareDev Randy Date: Thu May 14 17:43:45 2015 -0400 case-insensitive searching in list/slist Signed-off-by: Robert Story commit ae62b6f72e707f854d4a7cafb6e754a2744440a7 Author: VMwareDev Randy Date: Fri Jun 3 19:57:42 2016 -0400 add missing space in usmUser creation Signed-off-by: Robert Story commit 2e6196582086075107d218f13add0cb407ec75c9 Author: VMwareDev Randy Date: Tue Apr 14 14:19:49 2015 -0400 usm user fixes - fix cut-n-paste error in default priv protocol - add usm_remove_usmUser & usm_remove_usmUser_from_list - use new usm_remove_usmUser_from_list in usm_remove_user_from_list Signed-off-by: Robert Story commit 5ba5b846be7b03e0afb25a7357e229a593b9a583 Author: VMwareDev Randy Date: Wed May 11 20:43:18 2016 -0400 update SHA-2 auth OIDs from RFC 7860 Signed-off-by: Robert Story commit bc41f96f3f2046e977b58b4b568954e2576f8ca0 Author: VMwareDev Randy Date: Mon May 25 15:07:46 2015 -0400 add missing SHA define Signed-off-by: Robert Story commit f2f86778a0eeebcbe829deecf8d5edfd855dbb3e Author: VMwareDev Randy Date: Wed May 6 18:36:45 2015 -0400 add support for SHA-224 SHA-256 SHA-384 SHA-512 args - also use SNMP_DEFAULT_*_PROTO defines instead of hardcoding Signed-off-by: Robert Story commit bd1070d6e38c0c7be42168199b42d515cc21ceed Author: VMwareDev Randy Date: Thu Sep 15 23:26:46 2016 -0400 configure: move SHA2 tests from DTLS to OpenSSL section Signed-off-by: Robert Story commit 09ac3f2f68b2cf4bc3ff98d41a7e945c5eabffbb Author: VMwareDev Randy Date: Thu May 14 17:40:47 2015 -0400 more sha2 support changes - bump max usm authsize to support sha512; bump KU_LEN too - new sc_get_auth_maclen, sc_get_openssl_hashfn, usm_get_auth_oid - add some missing ifdefs, fix others - add slist with authtype mappings Signed-off-by: Robert Story commit d6a9d9db449b8114a315b27697d91c4a1242879d Author: VMwareDev Randy Date: Tue May 5 17:21:17 2015 -0400 update code to use sc_get_authtype() Signed-off-by: Robert Story commit 469c23efb01489e065f970bf8672f9879839f758 Author: VMwareDev Randy Date: Tue May 5 17:17:59 2015 -0400 new sc_get_authtype() to get type from OID - new sc_get_proper_auth_length() get length for type (instead of OID) - add lengths for new sha2 types Signed-off-by: Robert Story commit 8c89cd63b1416960afeba6f91741152d8592703e Author: VMwareDev Randy Date: Tue May 5 17:13:35 2015 -0400 add new sha2 auth protocols - new NETSNMP_USMAUTH_* integer type macros, using last subid of OID Signed-off-by: Robert Story commit e4c19527ec18f401cd6d9ce1e26032cc3249714c Author: VMwareDev Randy Date: Mon Mar 23 10:04:22 2015 -0400 fix compile when system-auth not configured Signed-off-by: Robert Story commit 12342576a437e862258dbc411ad19ebb15152e6e Author: VMwareDev Randy Date: Sun Mar 22 23:11:15 2015 -0400 fix merge Signed-off-by: Robert Story commit 9015732b5c731d57c2f6e937665180330f7c52e8 Author: VMwareDev Randy Date: Sun Mar 22 22:56:34 2015 -0400 handle missing priv protocol for system authpriv Signed-off-by: Robert Story commit 298cea2ae8094f65b11349d97aaad9755fcd0660 Author: VMwareDev Randy Date: Sun Mar 22 20:15:51 2015 -0400 always require auth/priv type - new 'default' to use system default - check that specified value matches system default Signed-off-by: Robert Story commit 00eca550a816becd392fdae706ad7d17c526e672 Author: VMwareDev Randy Date: Fri Mar 20 22:01:12 2015 -0400 move usmUser key length check/truncation outside ifdef Conflicts: snmplib/snmpusm.c Signed-off-by: Robert Story commit d426a5c2fd74806c21cd055ec82807c3151aeaba Author: VMwareDev Randy Date: Thu Mar 12 01:09:05 2015 -0400 add --enable-usmUser-uses-default-auth-priv Conflicts: configure.d/config_project_with_enable Signed-off-by: Robert Story commit 62e30bdb509e08a91c01ad12c6da3cfdb2f07baa Author: VMwareDev Randy Date: Thu Mar 12 01:20:01 2015 -0400 set errorMsg for short priv passphrase Signed-off-by: Robert Story commit c97a99647cad83e3c2f58c69eb2a2f3677799d07 Author: VMwareDev Randy Date: Mon Feb 2 10:38:37 2015 -0500 new usm_create_usmUser* Signed-off-by: Robert Story commit c2ec4f1e283209350094400be0cfcdad8ad4ddca Author: VMwareDev Randy Date: Thu Jun 2 12:53:01 2016 -0400 move ipv6 test inside ipv6 ifdef Signed-off-by: Robert Story commit c6cc9a1fd013dbab179abf159e0eb117bd847f07 Author: VMwareDev Randy Date: Thu Jun 2 12:52:37 2016 -0400 fix com2sec[6] parse code and test cases - fix lengths for context/secName/community tests - fix ipv6 hostnames for 1/2 AAAA record tests - fix error code for context too long - fix network/mask in debug output Signed-off-by: Robert Story commit 0a2a73bf7a155840ec857981a330ad5aefd8524b Author: VMwareDev Randy Date: Tue Apr 14 14:13:47 2015 -0400 fix swapped max length checks Signed-off-by: Robert Story commit 18d4bb9e07a5d893a97662d2494957ab955fee8b Author: VMwareDev Randy Date: Mon Apr 6 12:09:37 2015 -0400 address Fortify issue: check data length before using data ptr Signed-off-by: Robert Story commit 6773bbfd1643073640114b55b5d7465764be3d69 Author: VMwareDev Will Date: Fri Mar 20 13:56:11 2015 -0700 Werror fixes Signed-off-by: Robert Story commit 9d2c6f44e2bdc3fee8a090f64d936f035f3f42aa Author: VMwareDev Randy Date: Thu Mar 19 23:17:03 2015 -0400 only bind if have addr Signed-off-by: Robert Story commit 6906ba1c59b9996b075c99654bbf11321bb31f52 Author: VMwareDev Randy Date: Thu Mar 19 23:15:20 2015 -0400 copy max msg size from base transport Signed-off-by: Robert Story commit f82dd2276688534fd7d46178e68692cedd70a03c Author: VMwareDev Randy Date: Thu Mar 19 22:54:41 2015 -0400 fix uninitialize variable, length checks, string offsets Signed-off-by: Robert Story commit 99b4c51c46bf94b0392cc589d97983ed2e1f2a17 Author: VMwareDev Randy Date: Fri Mar 13 13:41:13 2015 -0400 call correct base transport function Signed-off-by: Robert Story commit f71f38e5fd1b7d23b441f54b773329adf3cca3c5 Author: VMwareDev Randy Date: Fri Mar 13 12:13:02 2015 -0400 return UNKNOWN if we cant format addr Signed-off-by: Robert Story commit a9ce31c4b8187aea07a648cf115e956159ac072e Author: VMwareDev Randy Date: Wed Mar 4 20:02:32 2015 -0500 refactor receive api, handle shared transports - break _sess_process_packet into _sess_process_packet_parse_pdu and _sess_process_packet_handle_pdu - extract _sess_read_accept and _sess_read_dgram from _sess_read Signed-off-by: Robert Story commit 5d8372341594b5a7e0ba1b6ec76463bf6d926bbe Author: VMwareDev Randy Date: Thu Sep 8 22:13:17 2016 -0400 shared transport + udp shared domain - refactor udp ipv4/6 base; break into smaller functions & export them - add transport cache - add tspec create for UDPDomain - update tspec struct to use generic flags instead of just 'local' Signed-off-by: Robert Story commit 6c8ef76cd08a27eae8d92c314a65b9047807a02e Author: VMwareDev Randy Date: Fri Feb 13 18:09:01 2015 -0500 fix missed pointer change, undo whitespace change Signed-off-by: Robert Story commit d5bfbf6de74d77ce047700c119a8b5b1f529d230 Author: VMwareDev Randy Date: Wed Feb 11 17:54:04 2015 -0500 new com2sec api Signed-off-by: Robert Story commit 4ad277f8ba2c6a684be42b0660b6480eb15c19c1 Author: VMwareDev Randy Date: Tue Nov 25 18:43:12 2014 -0500 add source addr/port option to trapsink/trap2sink/informsink Signed-off-by: Robert Story commit 60f97905363b84e0187eeb3b3543c72977af611b Author: VMwareDev Randy Date: Tue Nov 25 18:39:09 2014 -0500 add support for specifying client addr/port for UPDv4 transport - adds a new transport domain function, create_from_tspec. - a new structure, netsnmp_tdomain_spec, hold parameters, so that additional parameters can be added in the future without having to change the whole API stack. Signed-off-by: Robert Story commit 493e6e3928df91c9dd14d9cf1fb062284d1b1f8f Author: Niels Baggesen Date: Tue Sep 13 18:19:54 2016 +0200 RFC 7939 updated NHDP-MIB commit 367c44eb60565d126a51b3e66b54bc4384e62c7e Author: Niels Baggesen Date: Tue Sep 13 18:18:58 2016 +0200 Support for OpenBSD 6.0 commit d6e7f8962b110a2cd65667b2c57a8a60ad3cd222 Author: Niels Baggesen Date: Wed Aug 31 21:43:36 2016 +0200 at.c: properly check return status from realloc. Thanks to Daniel Eiland (bug 2678) commit 7cdb389a2814c6fdc0e7d9c43248329bfc028e3b Author: Niels Baggesen Date: Wed Aug 31 21:17:17 2016 +0200 kernel_sunos5: fix a possible buffer overrun. Thanks to lvosh. commit 0e6c1927d2ee2f4abaf18160016c10fd13712a95 Author: Niels Baggesen Date: Wed Aug 31 20:59:29 2016 +0200 snmptrapd.c: First stringop after malloc must be strcpy, not strcat. Tankts to Jaap Keuter. commit 7d3d56f07d3bd88d2583ee8832ec756af377215e Author: Niels Baggesen Date: Tue Aug 30 07:59:12 2016 +0200 Backport fix for MIB files with space in the name commit 5d819c82a54589138fbe8ad7e5011f0e656b497c Author: Niels Baggesen Date: Tue Aug 30 07:36:33 2016 +0200 Fix failure to handle MIB files with space in names. commit 85297cfadff81606d5a3b5ab162b39e5966ed963 Author: Niels Baggesen Date: Tue Aug 30 07:31:31 2016 +0200 Document the "octet" varbind type for pass/pass_persist. Thanks to Sam Tannous. commit 088622974007093fbb63f4a5964427f3c754e26d Author: Bart Van Assche Date: Sat Jul 23 19:37:03 2016 -0700 configure: Convert acconfig.h into AH_TOP() and AH_BOTTOM() This patch avoids that autoheader prints the following warning: autoheader: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot' autoheader: WARNING: and `config.h.top', to define templates for `config.h.in' autoheader: WARNING: is deprecated and discouraged. autoheader: autoheader: WARNING: Using the third argument of `AC_DEFINE' and autoheader: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without autoheader: WARNING: `acconfig.h': autoheader: autoheader: WARNING: AC_DEFINE([NEED_FUNC_MAIN], 1, autoheader: [Define if a function `main' is needed.]) autoheader: autoheader: WARNING: More sophisticated templates can also be produced, see the autoheader: WARNING: documentation. commit faa1af0e1f45b9533198beb693446699c683e969 Author: Bart Van Assche Date: Sat Jul 23 19:08:09 2016 -0700 T011snmp_old_api_registration_cagentlib: Expect that duplicate registrations are refused commit 4e793461e96a2b4fd81142ab312d074d5c8841fa Author: Bart Van Assche Date: Sat Jul 23 18:41:10 2016 -0700 CHANGES: BUG: 2712: Fix Perl module compilation Avoid that building the Net-SNMP Perl modules fails as follows: ERROR from evaluation of /sources/net-snmp-5.7.3/perl/ASN/Makefile.PL: Bizarre \ copy of HASH in list assignment at /usr/lib/perl5/site_perl/5.24.0/Carp.pm line\ 229. See also https://sourceforge.net/p/net-snmp/bugs/2712/. commit 71e487212bd65839e7454df9701524d08cf0d74f Author: Niels Baggesen Date: Thu Jul 21 21:45:26 2016 +0200 fsys.h: put paranthesis around macros which are expressions commit f6ffa6f131fd82068773fcebdcbf2cdf2412cc03 Author: Niels Baggesen Date: Thu Jul 21 21:41:28 2016 +0200 Bug#2726: Fix memory leak from udpEndpointTable when attemptinmg to insert duplicate. Thanks to Marc Branchaud commit e0ef511ce8c1b69fda79447eb9d790f409eb00f2 Author: Niels Baggesen Date: Thu Jul 21 16:32:51 2016 +0200 gcc 2.95 does not grok cpp directive inside macro call. commit 536bd305f8dbd8cb62b647e1ce768e4b369a8c1c Author: Niels Baggesen Date: Thu Jul 21 16:28:58 2016 +0200 OpenBSD: Fix a bad type causing crash with compiled in 32-bit mode. commit d28eefcf4062091f6dd35a64c0fbae55ad04aaf3 Author: Bart Van Assche Date: Wed Jul 20 19:21:20 2016 -0700 configure: Handle CFLAGS=-Werror=format-security etc. correctly See also https://sourceforge.net/p/net-snmp/patches/1330/. commit d8b12900629ed73a78b27535f08c4f0a721a93be Author: Jeff Gehlbach Date: Wed Jul 30 17:51:55 2014 -0400 CHANGES: snmpd: Add -cacheTime and -execType flags to "extend" config directive Add the following two flags to the "extend" config directive: -cacheTime specifies the cache timeout. -execType specifies the execution type (sh or exec). This enables non-volatile configuration of two aspects that so far have been configurable only temporarily via SETs. See also https://sourceforge.net/p/net-snmp/patches/1290/. commit 32cc6c32f96f17a5a4ccab1ae3a3896894fb4b97 Author: Bart Van Assche Date: Tue Jul 19 20:17:15 2016 -0700 configure: Do not discard CFLAGS added by the configure script This patch restores embedded perl support and fixes a regression introduced by commits 7c38dba0 / cd617c19. commit a3187c4569431ebee321e2bb0d5330eb5ea1b839 Author: Robert Story Date: Fri Jul 15 16:53:24 2016 -0400 dont call upper_bound for unsorted container commit 7c38dba0816eca9bd20378aab2313329502ed565 Author: Robert Story Date: Thu Jul 7 13:16:52 2016 -0400 run autoconf commit ded9cb57273da5c9518a281521dc1227fe03e894 Author: Robert Story Date: Thu Jul 7 13:14:12 2016 -0400 add VMware copyright to patched files commit 692c31cad01d3379713b86b6335419177f4e6281 Author: Robert Story Date: Thu Jul 7 11:02:52 2016 -0400 run autoconf commit 3b11b216f95b49ff731dcfab72da768913a6dde3 Author: VMwareDev Randy Date: Thu Jun 9 15:18:28 2016 -0400 ifdef function when unused Signed-off-by: Robert Story commit 85b869656562ab822837d128cfa3a251fefbe268 Author: VMwareDev Randy Date: Sat Jun 4 17:33:44 2016 -0400 add numbers to make some error messages unique Signed-off-by: Robert Story commit bbf3c43497993a18631329acd08b7013ff7e10e3 Author: VMwareDev Randy Date: Tue Apr 14 14:23:38 2015 -0400 limit loghandler priority levels Signed-off-by: Robert Story commit f6c78fbb7b16f86b5899370f8ffdb994ff6cac25 Author: VMwareDev Randy Date: Thu Apr 30 13:41:38 2015 -0400 missing endif Signed-off-by: Robert Story commit 40cebbcfbe3d580422f05c2194ce8b40fbddd868 Author: VMwareDev Randy Date: Thu Apr 16 20:41:59 2015 -0400 pass handler return code up to caller on error Signed-off-by: Robert Story commit 49235cd9f075dcb943355cf18d8da38420e1a99e Author: VMwareDev Randy Date: Thu Apr 16 11:37:48 2015 -0400 fix more compiler warnings, typos Signed-off-by: Robert Story commit 998df5d1ad58519f8358832db8a738099738aaad Author: VMwareDev Randy Date: Fri Apr 3 22:19:15 2015 -0400 various fixes noticed while reviewing Fortify issues - null checks - typos Signed-off-by: Robert Story commit 795d77c4f54b6dfd196634707a502c6cb6ec20b8 Author: VMwareDev Randy Date: Fri Apr 3 22:14:31 2015 -0400 address mib handler related Fortify leaks - don't create structures/memory inline in function calls - log messages on errors - follow convention that register functions free reginfo on errors Signed-off-by: Robert Story commit 8a41289629fcd5940cde23bf8668caa79fc7f944 Author: VMwareDev Randy Date: Fri Apr 3 18:26:42 2015 -0400 address Fortify memory leaks Signed-off-by: Robert Story commit 09679a2c47223b96930d388afac254bf001fc0c6 Author: VMwareDev Randy Date: Mon Mar 23 13:47:58 2015 -0400 fix fortify issues - type mismatch - null deref Signed-off-by: Robert Story commit 6f7a5921b79b3e01479fca592892937e084503e0 Author: VMwareDev Randy Date: Fri Mar 13 13:57:42 2015 -0400 rework netsnmp_ipv6_fmtaddr - strlcat/strlcpy instead of snprintf - preallocate buffer instead of static size Signed-off-by: Robert Story commit 0c1284d76b39cba4135e3ecdd7cfff72eb0b6a31 Author: VMwareDev Randy Date: Fri Mar 13 12:11:01 2015 -0400 increase viewSubtree size to account for length Signed-off-by: Robert Story commit 742651004e142e0c6fb3abc5a0303cebba105f35 Author: VMwareDev Randy Date: Fri Mar 27 12:52:00 2015 -0400 add debug shutdown to free tokens Signed-off-by: Robert Story commit a9850f4445cf4bebf8f04f0d2168042a3726fed1 Author: VMwareDev Randy Date: Mon Mar 30 21:03:34 2015 -0400 asn parse: add NULL checks, check length lengths - that is, make sure we have enough data to parse length before parsing length. Signed-off-by: Robert Story commit cd617c192a95a3b5384895c6457c093e1869338e Author: VMwareDev Randy Date: Wed Mar 25 16:33:39 2015 -0400 disable Werror for all configure tests Signed-off-by: Robert Story commit d321533c74b57279e63a38e56f4e7dfae731acde Author: VMwareDev Randy Date: Wed Mar 25 16:22:26 2015 -0400 another Werror fix Signed-off-by: Robert Story commit 235ed8ccbb872a0e9e47c3f70ad446b5a4ea716e Author: VMwareDev Randy Date: Tue Mar 24 12:47:15 2015 -0400 fix ptr math in memset Signed-off-by: Robert Story commit 77679a0dde15d61bc5a17373442c46189978d327 Author: VMwareDev Randy Date: Mon Mar 23 13:52:05 2015 -0400 better logging for unknown addr size in netsnmp_udpbase_send Signed-off-by: Robert Story commit 8a0243dc25b9ea32c195befe04e04b7a0807749b Author: VMwareDev Randy Date: Mon Mar 23 13:51:26 2015 -0400 allow ipv6 in netsnmp_gethostbyname Signed-off-by: Robert Story commit ae6c81f1789e36af831727b08240bd4e2814f854 Author: VMwareDev Randy Date: Fri Mar 20 16:44:16 2015 -0400 tests T132 and T142 don't use DES, so don't require it Signed-off-by: Robert Story commit cea974008da30de8d39a1f8ede7189265d93d598 Author: VMwareDev Randy Date: Fri Mar 13 12:11:44 2015 -0400 clear stack variable before use Signed-off-by: Robert Story commit 141c754461d51cf8573a9c81e2a4f9d35d382042 Author: VMwareDev Randy Date: Wed Mar 11 23:59:36 2015 -0400 no debug/len for failure case Signed-off-by: Robert Story commit 2d2792d1b30ea88c558cc76e59ba49e1638e4664 Author: VMwareDev Randy Date: Thu Mar 5 18:45:58 2015 -0500 handle netsnmp_indexed_addr_pair in ipv6 fmtaddr Signed-off-by: Robert Story commit fc5691d827a49fb36b078e4261d18a4a2bd63072 Author: VMwareDev Randy Date: Wed Mar 4 22:54:25 2015 -0500 use default free_item function Signed-off-by: Robert Story commit dd4c51a0b252c60062d5df0ba9f8e9dc0d6f27ee Author: VMwareDev Randy Date: Wed Mar 4 22:52:11 2015 -0500 use unique reqid/msgid for each trap sent Signed-off-by: Robert Story commit e70434007a7174580c78e5f57eeb68fa89371ce7 Author: VMwareDev Will Date: Wed Feb 11 23:43:39 2015 -0800 Use a ns_ prefix for function names that may conflict with math.h Signed-off-by: Robert Story commit 6e08b089d692bfce3643624089ee0be0d4cf3d5c Author: VMwareDev Will Date: Wed Feb 11 23:43:24 2015 -0800 Fix a const char * warning Signed-off-by: Robert Story commit 8d6f30c35f962d620eba141a3cf95965d74ba2ab Author: VMwareDev Will Date: Wed Feb 11 23:43:04 2015 -0800 Fix -Werrors regarding va_arg types Signed-off-by: Robert Story commit b3cfe3642d1210051979f667695fa2ae33fd7f45 Author: VMwareDev Randy Date: Tue Feb 3 20:57:17 2015 -0500 ifdef unused variable Signed-off-by: Robert Story commit 99a815f4f06ffc98ff6510f3a28d1fc4b39810fb Author: VMwareDev Randy Date: Tue Feb 3 20:11:14 2015 -0500 simplify ifndef block Signed-off-by: Robert Story commit 7ac7f70b63419d14e26a136ce693b19da24716a5 Author: VMwareDev Randy Date: Wed Jan 7 23:20:39 2015 -0500 fix typo in comment Signed-off-by: Robert Story commit 03b4d74db71168bdeb7c58b05a3241d243c1a39e Author: VMwareDev Randy Date: Wed Jan 7 10:13:35 2015 -0500 CHANGES: snmplib: fix bug that could drop log destinations Signed-off-by: Robert Story commit 8c91fd830c8ae180ca582893a2b74e1e7c56a79e Author: VMwareDev Randy Date: Fri Jan 2 02:14:24 2015 -0500 fix v2 errors in v1 responses when no write support Signed-off-by: Robert Story commit 777737d5a850ad54377d48d44f639fddbe80c752 Author: VMwareDev Randy Date: Fri Jan 2 02:12:24 2015 -0500 skip md5/des test if des is disabled Signed-off-by: Robert Story commit 1423c883031a420f4005ed9e0836610c676519fa Author: VMwareDev Randy Date: Fri Jan 2 02:11:52 2015 -0500 more informative config errors for DISABLE_DES & !HAVE_AES Signed-off-by: Robert Story commit 9bce2c9519a0551ee0c82ac4706fd9f3f875feab Author: VMwareDev Randy Date: Wed Jan 7 09:42:10 2015 -0500 CHANGES: BUG: 2387: fixed memory leak when request id is 0 Signed-off-by: Robert Story commit b12df261ae66dd8240a487f0c02b3d578276ee90 Author: VMwareDev Randy Date: Wed Jan 7 09:10:24 2015 -0500 clear to end of oid name to keep valgrind happy Signed-off-by: Robert Story commit 22deb593986f29615ff7dd602c02c6544ccd564a Author: VMwareDev Randy Date: Wed Jan 7 09:09:56 2015 -0500 tweaks for --disable-set-support - reject set before vacm checks - reject with noerror if no varbinds sent Signed-off-by: Robert Story commit 26f18eee6d77c21537783bf235a1858fa1347ed6 Author: VMwareDev Randy Date: Mon Dec 15 11:00:10 2014 -0500 remove unused variable Signed-off-by: Robert Story commit 639f63b84e0479db4221fcdcf3975a708af0a077 Author: VMwareDev Randy Date: Wed Dec 17 15:43:20 2014 -0500 vacm mib getnext fixes: dont bail on illegal values Signed-off-by: Robert Story commit c4f8f326e38085f96df40a5ca2d62991d1780acd Author: VMwareDev Randy Date: Tue Dec 16 22:48:28 2014 -0500 Fix Silvercreek 2.1.3.2 use oid instead of int for suboid Signed-off-by: Robert Story commit 9e4b85d67cf5fc1c119967738545d1f1fe2d3307 Author: VMwareDev Will Date: Tue Dec 9 12:22:51 2014 -0800 fixed failed detection of functions when -Werror is specified Signed-off-by: Robert Story commit 284ca60741be5050cb86fd83c357c8fa16225170 Author: VMwareDev Will Date: Fri Nov 21 15:41:34 2014 -0800 warning fixes for unused functions and variables Signed-off-by: Robert Story commit 20a70a7af5af206e5ed757b147a11ef2e6235b6b Author: VMwareDev Will Date: Fri Nov 21 13:45:01 2014 -0800 ifdef out function definitions that aren't used when no-mib-loading is on Signed-off-by: Robert Story commit 3766ae13eb07946043d5dde94f6035c321792366 Author: VMwareDev Will Date: Fri Nov 21 13:02:07 2014 -0800 get rid of unused variable warnings Signed-off-by: Robert Story commit 19adffe3b11bc4b11e43760840a448072d7f9c32 Author: VMwareDev Randy Date: Sat Mar 8 00:27:26 2014 -0500 slight tweak to configure autoconf check Signed-off-by: Robert Story commit 3850b172597835dc4c51b1a4226b6c9f929ce963 Author: Niels Baggesen Date: Fri Jun 17 11:54:23 2016 +0200 IANAifType-MIB: yet another update ... commit f9e2427686e084f25b5ab40975084e88bac2f2f7 Author: Niels Baggesen Date: Fri Jun 17 11:53:25 2016 +0200 rfclist: add RFC 7870 DSLite-MIB commit 0552e837a8171f143a62109f2b7ac614c652303f Author: Niels Baggesen Date: Wed Jun 15 21:27:50 2016 +0200 smistrip: do white space cleanup of rfc/iana mibs. Update mibs to cleaned versions. commit 29ac917b7d903b5bd7a28dc834915ff17b763afb Author: Niels Baggesen Date: Wed Jun 15 08:54:21 2016 +0200 Update to current IANAifType-MIB commit 0dc151a72ce495d3d94704efba609505e465292b Author: Niels Baggesen Date: Mon Jun 13 16:50:08 2016 +0200 UCD-SNMP-MIB: Add 64-bit memory objects for large servers. commit ebdc84df87eee303d7f5cbb858d17d468f1ff551 Author: Niels Baggesen Date: Mon Jun 13 16:12:02 2016 +0200 OpenBSD5.9: fixes to handle this OS. commit 8f05c1afbbe60243879d51abb4e228f7770d5512 Author: Niels Baggesen Date: Mon Jun 13 16:10:33 2016 +0200 udpTable: fix goind one over array when using kvm_getfiles. commit 8bbd51fb4f846dfc112cb32caa788652056f7320 Author: Niels Baggesen Date: Thu May 26 21:31:15 2016 +0200 BUG#2714: properly restore NETSNMP_DS_LIB_CLIENT_ADDR in _sess_open. Thanks to Jeremiah Martell. commit 2573c3d378c976cb9d54ad460f5f46218656f2b1 Author: Niels Baggesen Date: Thu May 26 21:10:53 2016 +0200 FreeBSD: Fix wrong masking of diskIONReadX/NWriteX to 32-bits. Thank to HJJakobsen for finding it. commit 296bdf92bd9a8f4877b6e6de7d18daba6cc4253e Author: Niels Baggesen Date: Thu May 26 21:07:53 2016 +0200 rfclist: Add RFC7856 SOFTWIRE-MESH-MIB commit 8dabf9a43cca47f65c3e4ada4aac1c9eb7e414e9 Author: Niels Baggesen Date: Wed Apr 27 20:41:53 2016 +0200 PATCH 1326/BUG 2503: Fix memory leak when walking ip forwarding tables. Thanks to Christian Krause/Sam Tannous commit 313035a0bb204cf2b68b6d797916eeec4e2bbdef Author: Niels Baggesen Date: Wed Apr 27 20:38:19 2016 +0200 transports/snmpIPv6BaseDomain: respect NETSNMP_TRANSPORT_FLAG_HOSTNAME when formatting address just as done for IPv4. commit cb268b66ee49a123ee36db18c1f4cdcf7bce477c Author: Niels Baggesen Date: Wed Apr 27 20:36:32 2016 +0200 Detect if mysql has my_load_defaults, and use it if so. Required for MySQL 5.7 on Ubuntu 16.04. commit 5b07aa798e16918b762feb12e594a812ed790bab Author: Niels Baggesen Date: Wed Apr 27 20:30:57 2016 +0200 PATCH 1324: arp_netlink: Ignore messages not being AF_INET/AF_INET6 Thanks to Sam Tannous. commit 71e6ff6eb2ab4c63fe1dca70e66253d2e04b235b Author: Niels Baggesen Date: Wed Apr 27 20:27:05 2016 +0200 IANA-RTPROTO-MIB: Update to current, fixing syntax error. commit a861f93d0f0c9e420ce77d7c261a712729464461 Author: Niels Baggesen Date: Fri Apr 15 17:35:22 2016 +0200 testing: Fedora24/RHEL7 does not install netstat by default. Use /usr/sbin/ss as a replacement when testing. commit 995794a0218b6bb7a43bf23d53d4efde2a6686df Author: Niels Baggesen Date: Fri Apr 15 17:34:34 2016 +0200 IANA-RTPROTO-MIB: Update to current IANA version. commit 63c3e1c2553fc1bea1c175fccd499c48b875445d Author: Niels Baggesen Date: Fri Apr 15 17:30:51 2016 +0200 Update with rfc 7784 commit 678275783e3a2c4d7b34ef246b78447c7fe414a9 Author: Bill Fenner Date: Sat Apr 2 18:41:24 2016 +0000 If the status goes disabled after it starts, the probe is completed. As the comment said: if you are pinging something that does not respond at all, the responses will never increase, and we should be querying pingResultsSentProbes to make sure that the probe has started. Now, if pingResultsSentProbes is nonzero and the status becomes disabled, we consider the test to be completed. commit 74ffd19da3e4831f7d713d70125d760a71026a91 Author: Bart Van Assche Date: Sat Mar 5 15:38:17 2016 -0800 Revert "Trim output of net-snmp-config --cflags." This reverts commit 127274f8f27fba264a4c0f91190fd6f8037cdf21. Robert Story explained as follows on the net-snmp-cvs mailing list why this patch is wrong and needs to be reverted: Actually, I --cflags is supposed to be everything used to compile the agent, so that subagents and modules for dlmod loading can be built exactly the same. In particular, removing other flags can remove options that will change structure sizes when parsing the headers, resulting in binary incompatibilities. If you only need the include directories for some reason, please add another option. commit 127274f8f27fba264a4c0f91190fd6f8037cdf21 Author: Jan Safranek Date: Wed Feb 24 10:14:21 2016 +0100 Trim output of net-snmp-config --cflags. We should report CFLAGS needed to import and use Net-SNMP headers, not CFLAGS used to compile actual Net-SNMP. E.g. we should not report various distro fortify-source options. commit 477b4307ef12ddce3b6a9205e0bdddbfb2e0e9b6 Author: Bart Van Assche Date: Sat Feb 20 18:58:18 2016 -0800 Remove U64 typedef The U64 typedef conflicts with a typedef in a Perl header file. Hence remove the U64 typedef from the Net-SNMP header files. This patch does not modify the Net-SNMP ABI. commit ed4e48b5fab165d1ba4c431e31e543f808a2c25f Author: Jan Safranek Date: Wed Feb 10 14:00:12 2016 +0100 CHANGES: snmpd: fixed memory leak in ETHERLIKE-MIB. ke->name in stdup-ed at line 297: n->name = strdup(RTA_DATA(tb[IFLA_IFNAME])); commit 3bbeec993754ab6fb3c23b3851479b8f714ac4db Author: codarrenvelvindron Date: Sun Jan 17 05:20:12 2016 +0000 Check for malloc failure commit d27ccfba26840ef8446152c007557ca4daa45a8f Author: Jan Safranek Date: Mon Jan 18 12:38:58 2016 +0100 Fixed potential bad free. When a 'default_domain' starts with a comma ',', the first strtok() returns pointer somwehere to the 'default_domain' duplicate and not to the first character. When cleaning up, make sure we try to free the duplicate (i.e. tokenized_domain) and not the first found token (which may be different). commit 8954ffd63ddd1e22b02473f0541b587013e146f4 Author: Bart Van Assche Date: Mon Dec 21 16:15:07 2015 +0100 .gitignore: Add apps/snmpping commit 0ac3c3d5ebe7db02505f60d763917b7d46715e22 Author: Bart Van Assche Date: Mon Dec 21 16:15:02 2015 +0100 Win32, MinGW, snmpping: Fix MinGW build commit e769fa1ddef4598e801fe3377d1a526976d07b2a Author: Bart Van Assche Date: Mon Dec 21 16:13:58 2015 +0100 Win32, MSVC, Perl modules: Give up if the Perl interpreter has been built with MSVC instead of gcc commit 24fee3539a7dfcbdac701d5c63768487e1822d87 Author: Bart Van Assche Date: Mon Dec 21 16:13:04 2015 +0100 Win32, MSVC, build.pl: Use File::Spec->catdir() commit 2dcb0a4fb18d475a313f093bff484aae8f9e3854 Author: Bart Van Assche Date: Mon Dec 21 16:11:29 2015 +0100 Win32: Micro-optimize perl/Makefile.PL Use Perl functions instead of invoking an external executable to determine the current directory. commit 21be8d8c489a41594e6b73ea3ad788bc23450613 Author: Bart Van Assche Date: Mon Dec 21 16:11:25 2015 +0100 perl/*/Makefile.PL: Strip trailing whitespace commit 2b600693acc4947f3fdc3e64465485699e824a37 Author: Bart Van Assche Date: Mon Dec 21 16:11:21 2015 +0100 perl/*/Makefile.PL: Regenerate makefiles commit 224aee0d9915115502531b4af0dcf3bcfab9fd3f Author: Bart Van Assche Date: Mon Dec 21 16:11:14 2015 +0100 perl/make-perl-makefiles: Improve robustness Make it possible to run this script from another directory than the perl directory. commit acddd4e69efc7653d49493c248a008e8d1676cec Author: Bart Van Assche Date: Mon Dec 21 16:11:09 2015 +0100 perl/Makefile.makefiles: Determine Makefile.PL list dynamically commit 7ea671729781e4f7e7b25c77fcb8940f8b126c3b Author: Bart Van Assche Date: Mon Dec 21 16:11:03 2015 +0100 Win32: Fix large fdset implementation Reported-by: Andreas Rieke commit f67f8f2b5d9779ecfb8f8f4bee32573e5b241afe Author: Bart Van Assche Date: Mon Dec 21 16:10:16 2015 +0100 .gitignore: Ignore Perl .json files commit c09140c934eb9de6b861cab063cdad66a721ffb1 Author: Jan Safranek Date: Mon Nov 30 14:26:46 2015 +0100 CHANGES: snmpd: Increase maximum AgentX packet size to 64kB. commit 45f256f87c32f7e851c88393ac2b626aa1e8cd4b Author: Niels Baggesen Date: Tue Nov 24 09:00:55 2015 +0100 BUG#2681: Add dynamic allocation to proxy parser. Thanks to Date: Tue Nov 24 08:59:16 2015 +0100 Add RFCs 7577,7658,7659,7666 commit 85ac52cb0227bbda4cf0b3fbb506d25789e04446 Author: Niels Baggesen Date: Tue Nov 24 08:46:52 2015 +0100 BUG#2674: Remember to free buffer for control blocks. Thanks to Laurent GOUHIER. commit 40f9cb08787f41621fdaedccbe5793fad319bde2 Author: Niels Baggesen Date: Tue Nov 24 08:43:52 2015 +0100 BUG#2675: fix a stray close of filedescriptor. Thanks to Vit Zikmund. commit f561f6414a7a5b8be2be544f7b24fe6b529782b4 Author: Niels Baggesen Date: Tue Nov 24 08:32:43 2015 +0100 BUG#2675: fix a stray close of filedescriptor. Thanks to Vit Zikmund. commit 941ad547f5bdc47faeb27280b6d3047b21d1a239 Author: Bart Van Assche Date: Tue Oct 6 19:41:36 2015 -0700 CHANGES: MIB: Speed up reading /proc/net/tcp and /proc/net/tcp6 The time needed to read Linux procfs files is proportional to the square of the quotient of the file size and the read buffer size. Increase the read buffer size to decrease the time needed to read large procfs files. commit 2331a015dcd95d7f34aa28962d1a37b5e360c646 Author: Bart Van Assche Date: Mon Oct 5 21:42:58 2015 -0700 BUG: 2671: container_binary_array takes O((n^2)*log(n)) time to insert n entries Change the complexity of netsnmp_binary_array_insert() from O((n^2)*log(n)) into O(log(n)). commit 10a71e97f096ce3d0c284c8213da1b2107c32699 Author: Bart Van Assche Date: Mon Oct 5 21:24:38 2015 -0700 snmplib: binary_search(): Make source code more compact Additionally, remove two superfluous initializations. commit 50e13c2244e110319e1112a2ed3e9ba174144794 Author: Bill Fenner Date: Mon Oct 5 13:58:49 2015 -0700 CHANGES: snmpd: PATCH: 737: fixed integer64 support in pass and pass_persist The integer64 support was using the wrong ASN_ type, resulting in an encoding error when trying to create the response. As usual, the testing is way more than the change being tested :-) commit e684da65018039cc87c44eaf2fe184d052ba432c Author: Peter Rosin Date: Fri Aug 7 17:14:07 2015 +0200 Allow external events in standalone agents. Signed-off-by: Bill Fenner commit a9e46754357a3852b788e0d3df27b1f432cd1b8f Author: Niels Baggesen Date: Mon Sep 28 20:49:24 2015 +0200 BUG a#2656: proper printing of index-oid for column not defined in MIB. commit 7781fc92322ff2d47a7cd8c37a3dc6cb21985ab1 Author: Bill Fenner Date: Fri Sep 11 11:20:47 2015 -0700 Freebsd has type and pid fields. commit d4519fb66d05cfc950b09726258069fc4e7de123 Author: Bill Fenner Date: Fri Sep 11 11:20:47 2015 -0700 Freebsd has type and pid fields. commit 0c490ab4b8f3a7b3a226adc69b8f8a86cd864b04 Author: Bill Fenner Date: Fri Sep 11 11:12:10 2015 -0700 Don't attempt to write to utmp if the process appears dead net-snmp has no business writing to utmp; let the system handle that. Simply skip counting processes that appear dead. commit 87332ba1266414694c58e0fbca87ab9bcf02f76f Author: Jan Safranek Date: Tue Aug 18 17:14:20 2015 +0200 Fixed possible integer underrun. In theory, 'i' could be negative and close(-1) is not defined. This should never happen, this patch just makes Coverity happy. commit aff1fb31dac236bb5f8e641c92e5651f00fa4f7d Author: Jan Safranek Date: Thu Jul 30 11:25:48 2015 +0200 CHANGES: snmpd: restore read-write flag in hrFSTable when a device becomes writable commit d87d2687e1d11d12c52f2bdbec4a52f5290c4e39 Author: Bill Fenner Date: Fri Jul 17 21:10:16 2015 +0200 minor snmpping improvements Update snmpping based on using it against JunOS: - OperState can be disabled before it is enabled; wait for completed, or OperState disabled plus non-zero packets. - SumOfSquares, when RTT < 1.0, can be less than the number of pings; clamp the stddev to 0.0. Not JunOS-specific: - Retry on timeout. - Add some debugging to the response handler. commit adaa69fc3c54f6907f8abb7fba7b62517385f6da Author: Bill Fenner Date: Thu Jul 16 08:11:35 2015 -0700 CHANGES: snmplib: BUG: 2573: skip malformed mib_index files The code trying to remove the '\n', when given a file full of NULs, boils down to tmpbuf2[-1] = 0. The workaround is to make sure that we have a "DIR ", to validate that the file looks valid. commit 19ee9ccc2b32d03253e08717b92a09647d010f13 Author: Niels Baggesen Date: Mon Jul 13 21:12:25 2015 +0200 snmptrapd: use forkall on Solaris, if available. commit 109ef7fdf5402bf77f44e8d86f74deacd045d4b8 Author: Niels Baggesen Date: Mon Jul 13 16:33:43 2015 +0200 diskio: 64-bit counters for NetBSD. commit d774fe317160cb1dd7c839c1afb975dd4bb5ce41 Author: Niels Baggesen Date: Mon Jul 13 15:22:33 2015 +0200 diskio.c for FreeBSD: mask values to 32 bit to avoid warning when encoding. Fixes #2647. commit 77b80bd2011323e777ca1867ac730775f073896f Author: Niels Baggesen Date: Mon Jul 13 15:20:32 2015 +0200 Minor fixes for DragonflyBSD 4.2 commit 19b49d4789027bfac1c4490a05dc02bdc0248d94 Author: Bart Van Assche Date: Thu Jul 9 18:56:22 2015 -0700 include/net-snmp/net-snmp-config.h.in: Regenerate commit 7f00e801a134bb6f72d40368cc4931e2d051ae58 Author: Bill Fenner Date: Wed Jul 8 13:37:25 2015 -0700 CHANGES: BUG: 2602: Added return statement to example code for TrapReceiver commit 0c70de45d07778e329cf8740a31e1ce943d0845e Author: Bill Fenner Date: Tue Jul 7 15:10:04 2015 -0700 Regenerate commit 4ea8373caf9c1e5720d92995e3748757fbb58970 Author: Bill Fenner Date: Tue Jul 7 15:09:33 2015 -0700 Regenerate commit d6dabb0e14858bbb480b270ec6656e5f5fa9f0cc Author: Bill Fenner Date: Tue Jul 7 12:31:38 2015 -0700 Conditionally compile snmppcap on finding libpcap (except, we haven't exposed snmp_parse() yet, so it still won't build.) commit 1eb6629cef3d3d8de3232c7ae04c2ab521b8163f Author: Bill Fenner Date: Tue Jul 7 08:01:26 2015 -0700 CHANGES: BUG: 2624: stop trying to use the deprecated perl uninstall Perl's ExtUtils::MakeMaker deprecated uninstall in 1997, and has not replaced it. Stop trying to use it, and mention in the INSTALL document that you cannot uninstall the perl module this way. See https://sourceforge.net/p/net-snmp/bugs/2624/ for more discussion. commit bf14d02f0948f2032951d271bb0d14d5ca318d80 Author: Bill Fenner Date: Tue Jul 7 07:55:13 2015 -0700 CHANGES: BUG: 2585: fix autoconf check in config_os_progs commit 1ab4308396dc5acd5f4d3ba97fdef315a24ab057 Author: Bill Fenner Date: Tue Jul 7 07:50:58 2015 -0700 Introduce snmpping, a client for DISMAN-PING-MIB. commit 9c66a12ad9c50ae52a89b1fbe8600d1813b6fc2b Author: Alexander Heinlein Date: Mon May 11 13:33:01 2015 +0200 Don't disable GET-requests with --disable-set-support (fixes #01c930e) commit 74e03d37c7a805d476f71bc85d300915fe48e6cb Author: Wes Hardaker Date: Mon Jul 6 23:39:50 2015 -0700 fixes for the 5.4 release tree commit 27ce6578f8cf4002324d7d04e07f04b0a5a9331a Author: Wes Hardaker Date: Mon Jul 6 23:38:32 2015 -0700 version update for 5.4.5.pre1 commit dd1e845918e6cb58f54aee52db4cc02d9b15157b Author: Wes Hardaker Date: Mon Jul 6 23:36:42 2015 -0700 version update for 5.4.5.pre1 commit d6abdcf1262d5908ac371e70f63c1c48b9aeeb88 Author: Wes Hardaker Date: Mon Jul 6 23:31:02 2015 -0700 make depend for 5.4.5.pre1 commit 66a8561c10b69a284bf83c652e6656b6d2ca5008 Author: Wes Hardaker Date: Mon Jul 6 23:10:13 2015 -0700 documentation update for 5.4.5.pre1 commit a188afbe66349ee15fb5a0428f206d0d03208c54 Author: Wes Hardaker Date: Mon Jul 6 22:15:40 2015 -0700 Version number update: 5.4.5.pre1 commit 0b35a3e365e260e5d86e778b999954ea39092096 Author: Wes Hardaker Date: Mon Jul 6 22:15:21 2015 -0700 version update for 5.4.5.pre1 commit c3ea313373e4139f6e391ffce4d8cf2b593de1a8 Author: Bill Fenner Date: Mon Jul 6 15:03:55 2015 -0700 Test script for https://sourceforge.net/p/net-snmp/bugs/2495/ Try HUP'ing the agent with exec statements configured, and see if we get extra extNames.3 / extNames.4 configuration. commit 5c03c35dc517c9acb7e1c6f733675c7808ed8a3e Author: Wes Hardaker Date: Mon Jul 6 14:18:56 2015 -0700 remove the 5.5 and 5.6 branches from the list of active branches commit bec6243394ed78897c14e3fa46f934e0ea3d453e Author: Jan Safranek Date: Fri Jun 26 13:30:07 2015 +0200 snmpstatus: CHANGES: Fixed crash when receiving non-standard compliant responses. Some HW sends ifOperStatus as NULL instead of INTEGER type. We should not try to dereference this NULL. commit 8f431d410b803603dc809d82e0893509615d9a11 Author: Niels Baggesen Date: Thu Jun 25 22:32:39 2015 +0200 configure: fix check for --enable-perl-cc-checks commit e2ce8bb37819c9ae24d482ac4108772f7b2c9b8c Author: Niels Baggesen Date: Thu Jun 25 22:28:55 2015 +0200 swrun_procfs_psinfo: Fix includes for Solaris 11.2 commit 09f339330b494728a98c74a5e21fa0a61cba211d Author: Bart Van Assche Date: Sat Jun 20 16:33:31 2015 -0700 BUG: 2637: MSVC 14.0 build fix commit 59f9f3387dab4238114804a0be9e4c15667d868c Author: Jan Safranek Date: Fri Jun 19 09:29:06 2015 +0200 Fixed memory leak on realloc failure. Found by Coverity. commit f9e6b8dd0e6ba75c712dee3cb2f41a8f46e25cd4 Author: Niels Baggesen Date: Thu Jun 18 21:41:56 2015 +0200 route_sysctl.c: Ignore cloned route entries, to avoid duplicates. commit 315a9dfeddbad9c611833c9625d6c1c6d7c38324 Author: Niels Baggesen Date: Thu Jun 18 21:33:31 2015 +0200 nmp_transport.c: use strtok_r for strtok to avoid a race condition. commit dbef63d8aad631ae58a9e23f267fa735ee63ff27 Author: Niels Baggesen Date: Thu Jun 18 21:29:34 2015 +0200 Add missing -Ln together with the upper case option variants to the manual, together with some minor nits. commit a58622bc39ebf0191bc2b2934da985a4d144be33 Author: Niels Baggesen Date: Thu Jun 18 21:27:17 2015 +0200 Fix some nitpicks in man pages. commit ed5386cd2f2fb50478b7e900e4c7da669977b4ef Author: Niels Baggesen Date: Thu Jun 18 21:22:49 2015 +0200 icmp.c: Fix missing initialization. commit 309a48aa0618945ad5ab1eb6b7698e28580f08c2 Author: Bart Van Assche Date: Tue Jun 16 19:40:58 2015 -0700 BUG: 2638: Fix a recently introduced build error Revert "MIB-II, ICMP: Fix a memory leak in an error path" This reverts commit 8521f044e516a77e3455e4e4fd585da0bcdeca03. commit 2c9e8b01f33b552f112897908a1b5f68a2a0d043 Author: Bart Van Assche Date: Sun May 24 18:48:05 2015 +0200 testing, T014gethostbyaddr_clib.c: Fix a use-after-free commit 72f789674f18b6785d1a42c5d380844e41e84378 Author: Bart Van Assche Date: Sun May 24 18:49:58 2015 +0200 snmptrapd: Fix memory leaks in error paths commit c816da4a2504f66a0555e9b046b2b7595b4cb574 Author: Bart Van Assche Date: Sat May 23 13:48:49 2015 +0200 snmptrapd: Fix gid check Detected by Coverity. commit 6f71d0e51719061f1378cf8af4a107a0e021f817 Author: Bart Van Assche Date: Sat May 23 13:53:35 2015 +0200 snmptrapd: Avoid that Coverity complains about dup2() and close() commit 3e6bf98e4a494d3f9ea44e7975864a7eedca0d51 Author: Bart Van Assche Date: Sat May 23 11:03:28 2015 +0200 snmptrapd: Fix a memory leak in an error path Detected by Coverity. commit 78c0b2ba8820fdc728a04b4752bca75090798e52 Author: Bart Van Assche Date: Sun May 24 18:32:09 2015 +0200 snmpd: Comment out dead code commit 131490da5a28e284fdd031651e1527963fdaa6fa Author: Bart Van Assche Date: Sun May 24 18:27:57 2015 +0200 snmpd: Avoid dereferencing a NULL pointer commit 16c199a01840ec6fd2c9fcab6af69d5a7a50423d Author: Bart Van Assche Date: Sat May 23 13:02:21 2015 +0200 encode_keychange: Check setup_engineID() return value Detected by Coverity. commit 99f836007fd823014b0efb037a6e707b56807ffb Author: Bart Van Assche Date: Sat May 23 13:36:17 2015 +0200 python: Fix a potential buffer overflow Detected by Coverity. commit cde325879630b6e63a5b6a0c2aaa3343fa356d48 Author: Bart Van Assche Date: Sun May 24 18:45:21 2015 +0200 perl: Avoid returning a pointer to an out-of-scope stack variable Detected by Coverity. commit e009d0d05343f531cfc303c24b25e9f32f55233b Author: Bart Van Assche Date: Sat May 23 13:45:30 2015 +0200 perl: Fix a potential buffer overflow commit 675babcb94bb0ddbebbe06c089ef47ca480dbb45 Author: Bart Van Assche Date: Sat May 23 11:56:22 2015 +0200 perl: Fix snmp_return_err() argument order Detected by Coverity. commit 0d5f487e0c09141172e723782b43eaf5275f4d83 Author: Bart Van Assche Date: Sat May 23 09:17:24 2015 +0200 MIB examples: Fix memory leak in an error path commit 87cadb0b1d6a476d2297cdddca60483006ba25f8 Author: Bart Van Assche Date: Sat May 23 08:55:00 2015 +0200 MIB examples: Fix a resource leak in an error path Detected by Coverity. commit bad4e22eb0a002936792821baa5d92c15b1376fe Author: Bart Van Assche Date: Sat May 23 09:05:18 2015 +0200 UCD-SNMP proxy: Fix memory leaks in error paths Detected by Coverity. commit aec75aab09550603b7d2e339d62b410405a8cc3e Author: Bart Van Assche Date: Sat May 23 12:06:37 2015 +0200 UCD-SNMP-logmatch: Prevent array overflow Detected by Coverity. commit 2c6fd84fa069d742ae330a9ef1e79227973bbe35 Author: Bart Van Assche Date: Sat May 23 12:04:56 2015 +0200 UCD-SNMP-DISKIO: Prevent array overflow Detected by Coverity. commit eefd830090be3933f5a31a4afbaaad0ba79dc7ee Author: Bart Van Assche Date: Sat May 23 12:34:50 2015 +0200 TUNNEL-MIB: Use strlcpy() instead of strcpy() Suggested by Coverity. commit 6b4d1e183f31a2a05a4f68fc72629ba655d61c2f Author: Bart Van Assche Date: Sun May 24 12:27:06 2015 +0200 SNMP-USER-BASED-SM-MIB: Avoid dereferencing a NULL pointer commit e7595c13a32260b738342f706e17521e9a3bf5b6 Author: Bart Van Assche Date: Sun May 24 12:56:14 2015 +0200 SMUX: Check asn_parse_header() return value consistently commit 117a3c1ad42d74cc2678436a5cf50fd4e07cef7a Author: Bart Van Assche Date: Sun May 24 12:46:41 2015 +0200 SMUX: Remove superfluous checks Checking whether a pointer is NULL after having dereferenced that pointer does not make sense. Hence remove these checks. Detected by Coverity. commit 3ec2de5a76fc444b5b17bad536d0ac8dbe67b0dd Author: Bart Van Assche Date: Sat May 23 08:53:30 2015 +0200 SMUX: Fix a resoure leak in an error path Was the "close(sd)" statement a typo ? Detected by Coverity. commit 13ce35f50f0c37e96e779d9c86ddeebbc5bc59f2 Author: Bart Van Assche Date: Sat May 23 08:46:13 2015 +0200 SMUX: Fix memory leaks in error paths Detected by Coverity. commit 15d0a26b8404e129f15d216342a80280f5aa7249 Author: Bart Van Assche Date: Sun May 24 09:52:19 2015 +0200 RMON-MIB: Fix a memory leak in an error path commit 4dbe86ded0b688377eef773db25340db54d4dcdc Author: Bart Van Assche Date: Sat May 23 12:31:15 2015 +0200 NET-SNMP-SYSTEM-MIB: Use strlcat() instead of strcat() Suggested by Coverity. commit 08e5b6d40f2a289a3d9e56dfda600c983ae10201 Author: Bart Van Assche Date: Sun May 24 09:37:50 2015 +0200 NET-SNMP-SYSTEM-MIB: Initialize a buffer in an error path commit 90610e89892b7fd7a2c026736477d7328943891d Author: Bart Van Assche Date: Sat May 23 11:45:48 2015 +0200 MIB-II, IPv6: Avoid integer overflow Detected by Coverity. commit 8404ef684664afaa2ace1f8faf4667ba71dd763f Author: Bart Van Assche Date: Sat May 23 12:07:51 2015 +0200 MIB-II, IPv6: Prevent array overflow Detected by Coverity. commit 7990c9d77c65ff864bc016332a36f5bd2dabe747 Author: Bart Van Assche Date: Sat May 23 08:33:20 2015 +0200 MIB-II, route_write: Initialize dst.sin_port and gateway.sin_port Detected by Coverity. commit f7138f2a73f622892f178da571373e30ee1bdb1d Author: Bart Van Assche Date: Sat May 23 07:44:16 2015 +0200 MIB-II, TCP table: Initialize pcb.inp_next Detected by Coverity. commit 8521f044e516a77e3455e4e4fd585da0bcdeca03 Author: Bart Van Assche Date: Sat May 23 08:48:33 2015 +0200 MIB-II, ICMP: Fix a memory leak in an error path Detected by Coverity. commit ed482d19f83ba19e73cf91f9ee7bdb1bbc58f312 Author: Bart Van Assche Date: Sat May 23 13:25:05 2015 +0200 IP-FORWARD-MIB: Fix a size check Use multiplication instead of division when testing inetCidrRoutePolicy_val_ptr_len. Detected by Coverity. commit 05590fc804bdc8967559f18c7a2cf34104aefe56 Author: Bart Van Assche Date: Sat May 23 07:35:21 2015 +0200 IP-FORWARD-MIB: Initialize gateway.sin_port Detected by Coverity. commit 1fd0de48751ab9b86b17633e95b665d51b1cdd45 Author: Bart Van Assche Date: Sun May 24 12:29:02 2015 +0200 IF-MIB: Avoid dereferencing a NULL pointer commit 59f5b8cc73b2b3589acd1456f166a3c68038990b Author: Bart Van Assche Date: Sat May 23 08:07:08 2015 +0200 EtherLike-MIB: Fix a memory leak in an error path Detected by Coverity. commit 766ac18693efa958c2f3b5d816ab799e826a4851 Author: Bart Van Assche Date: Sat May 23 17:05:03 2015 +0200 DISMAN-TRACEROUTE-MIB: Fix more memory and resource leaks commit 843ac67881f6a68e35868ed67e4e78c9ab155666 Author: Bart Van Assche Date: Sat May 23 16:53:42 2015 +0200 DISMAN-TRACEROUTE-MIB: Fix more use-after-free issues commit 28822a97b17c839f67d25d0df18b105428e58ae0 Author: Bart Van Assche Date: Sat May 23 15:03:23 2015 +0200 DISMAN-TRACEROUTE-MIB: Split two functions commit f91c62e0a1c37fba6c1e816c18160fe1e22e84cc Author: Bart Van Assche Date: Sat May 23 14:48:20 2015 +0200 DISMAN-TRACEROUTE-MIB: Remove register declarations A modern compiler doesn't need these. commit 400729e3459c7952ae7ed40b741e6ad23c08f015 Author: Bart Van Assche Date: Sat May 23 08:31:36 2015 +0200 DISMAN-TRACEROUTE-MIB: Fix several use-after-free issues Detected by Coverity. commit 6ffb0a32f55210d6c6842bad1bc91ec690846170 Author: Bart Van Assche Date: Sat May 23 07:46:34 2015 +0200 DISMAN-TRACEROUTE-MIB: Fix several memory and resource leaks Detected by Coverity. commit f30429749a043d556cdfa8cd3abcf4737c93a8a9 Author: Bart Van Assche Date: Sun May 24 09:46:05 2015 +0200 DISMAN-PING-MIB: Fix use-after-free issues commit 1866a2580f83abc7c1c227404162ab06ea5c8bfd Author: Bart Van Assche Date: Sat May 23 11:04:45 2015 +0200 DISMAN-PING-MIB: Fix memory leaks in error paths Detected by Coverity. commit 309e0af8308cd2d55d971091ef7d84b3037a2308 Author: Bart Van Assche Date: Sat May 23 08:09:01 2015 +0200 DISMAN-PING-MIB: Initialize msg_flags Detected by Coverity. commit 6fd1a5873cfd098f810009ba0d6c01e9d7b94d68 Author: Bart Van Assche Date: Sun May 24 09:45:24 2015 +0200 DISMAN-NSLOOKUP-MIB: Fix use-after-free issues commit 82b482e26bb0295e2d9c517ca1229530eeb5edbb Author: Bart Van Assche Date: Sat May 23 11:37:28 2015 +0200 DISMAN-EXPRESSION-MIB: Fix a flag test Detected by Coverity. commit 007b5c1588c8fe2c7d846a4ccc0b0bcc12ec2564 Author: Bart Van Assche Date: Mon May 25 09:21:43 2015 +0200 snmpd: Make netsnmp_unregister_handler(NULL) safe commit b8d0ee82dd98fc00624c8b036ea3bb429723e26c Author: Bart Van Assche Date: Sun May 24 09:13:56 2015 +0200 snmplib, parse_imports(): Avoid reading an uninitialized modid variable for MIBs with invalid syntax Detected by Coverity. commit 55fbb6d933a75ed7c0ca201f90adcfc33707f1b8 Author: Bart Van Assche Date: Sun May 24 08:46:32 2015 +0200 snmplib, _daemon_prep(): Add error checking and switch to dup2() These changes reduce the number of resource leaks reported by Coverity. commit 3229e8a3d276ebcc57f2ddc55086cfce16efc07d Author: Bart Van Assche Date: Sat May 23 18:05:18 2015 +0200 snmplib, snmpv3_generate_engineID(): Avoid reading uninitialized data Detected by Coverity. commit d78692d40fdabc62c9b4bd8644d93c01f9d301f6 Author: Bart Van Assche Date: Sat May 23 16:16:04 2015 +0200 snmplib, TLS transport: Comment out dead code Detected by Coverity. commit c2b4001f5d489d699e4db47200c06b03ca4f22ff Author: Bart Van Assche Date: Sat May 23 16:11:09 2015 +0200 snmplib, IPv6 transport: Fix memory leaks in error paths commit b3bc97927052140eaf759a52c875d6558d1c5756 Author: Bart Van Assche Date: Sat May 23 16:08:33 2015 +0200 snmplib, snmp_parse_oid(): Fix a memory leak commit 29767f5bc157f8051cb781299a499d927a0d090c Author: Bart Van Assche Date: Sat May 23 15:57:43 2015 +0200 snmplib, netsnmp_cert_find(): Fix a memory leak commit 1589177e54be8614eb7e11239d791b098b2ec3e0 Author: Bart Van Assche Date: Sat May 23 15:49:56 2015 +0200 snmplib, netsnmp_tdomain_transport_full(): Make this code slightly easier to read This change avoids that Coverity reports a false positive for this code. commit dc7ed248badb3122093d5e22c598b7eccc67b650 Author: Bart Van Assche Date: Sat May 23 15:41:21 2015 +0200 snmplib, netsnmp_parse_args(): Fix a memory leak in an error path commit fdefbf7120839acfd5ec3ede484687f7280cbef0 Author: Bart Van Assche Date: Sat May 23 15:39:32 2015 +0200 snmplib, parse_asntype(): Fix a memory leak in an error path commit f3d81e05271c9591db69ab5f76e408898e4c03c9 Author: Bart Van Assche Date: Sat May 23 15:32:19 2015 +0200 snmplib, _add_strings_to_oid(): Remove dead code Detected by Coverity. commit 83963a62ef958c985cfd9d97632d633c6e7d2240 Author: Bart Van Assche Date: Sat May 23 15:24:44 2015 +0200 snmplib, container_list_ssll: Remove a superfluous check Reported by Coverity. commit a1e8ef82b679ea777321a9668cfd9358ccee167d Author: Bart Van Assche Date: Sat May 23 15:13:18 2015 +0200 snmplib, container_list_ssll: Move NULL check before dereference Detected by Coverity. commit 2ecfad6e478c8c92cb1fccdf241dd716f68e9427 Author: Bart Van Assche Date: Sat May 23 15:10:33 2015 +0200 snmplib, TLSTCP domain: Avoid dereferencing a NULL pointer Detected by Coverity. commit f472db1e11d213c9197ee0cdc7c21e949356d493 Author: Bart Van Assche Date: Sat May 23 13:52:49 2015 +0200 snmplib, netsnmp_close_fds(): Avoid passing a negative argument to close() commit 2ef35da79f1925717b3ea5c3b855e2af49bf1619 Author: Bart Van Assche Date: Sat May 23 13:04:41 2015 +0200 snmplib, sprint_realloc_hexstring(): Handle netsnmp_ds_get_int() failure correctly Detected by Coverity. commit 5384fafe9b609e85b9a700074fb051f2539b28e2 Author: Bart Van Assche Date: Sat May 23 12:51:52 2015 +0200 snmplib: Check strdup() return value Reported by Coverity. commit 2e09b2b35387032bafc6fdea36783d9b5a843ca9 Author: Bart Van Assche Date: Sat May 23 11:40:50 2015 +0200 snmplib, snmp_openssl: Add missing braces Detected by Coverity. commit adf1ace7975c0c24387ee0618b80ba08a37d94bd Author: Bart Van Assche Date: Sun May 24 12:38:45 2015 +0200 snmplib, container: Make CONTAINER_FREE(NULL) a no-op commit 8f5d0449aa53f5b766159d0d1116a184705d5b94 Author: Bart Van Assche Date: Sat May 23 09:23:23 2015 +0200 snmplib, container: Fix a memory leak in an error path Detected by Coverity. commit 8f2f101ff96c01aa1395101ed0f0c7a68a8f1b23 Author: Bart Van Assche Date: Sat May 23 08:29:33 2015 +0200 snmplib, parse_objectid(): Fix memory leaks in error paths Detected by Coverity. commit 7ce0e040d637354b773352543c370cbc4596e06b Author: Bart Van Assche Date: Sat May 23 08:40:48 2015 +0200 snmplib, table iterator: Fix a memory leak in an error path Detected by Coverity. commit 7208d0511507d473618654fc32d26657839d5a23 Author: Bart Van Assche Date: Sat May 23 08:03:06 2015 +0200 snmplib, netsnmp_tlstmAddr_restore_common(): Fix a potential memory leak Detected by Coverity. commit 1ee72102fbe722d232d74abc4660a8b134cec8d6 Author: Bart Van Assche Date: Sat May 23 07:32:53 2015 +0200 snmplib, UDPIPv6 transport: Add a missing return statement Detected by Coverity. commit 234042b18a436708007f764c7281a300c0317245 Author: Niels Baggesen Date: Tue Jun 2 20:04:41 2015 +0200 Support for Darwin 14. commit 95ccfb7406592f27e0189bc1a13cec0f3aa397ea Author: Niels Baggesen Date: Thu May 28 18:06:28 2015 +0200 OpenBSD 5.7: Support IPV6-MIB commit 263b663d63bd648603455636f278380c2b5db55b Author: Niels Baggesen Date: Thu May 28 15:38:23 2015 +0200 NetBSD7: First stab for this OS. commit ebcca14b557fca2d64532c7c0ba0cc2f45cd621d Author: Bart Van Assche Date: Sun May 17 18:58:38 2015 +0200 testing: Extend T155dismanexprmib_simple commit 32f42f69636800a549716c981d6fd139ac1dd96c Author: Bart Van Assche Date: Thu May 21 08:57:43 2015 +0200 new DISMAN EXPRESSION MIB: Fix a double free Avoid that Valgrind reports the following complaint: Invalid read of size 8 at 0x566EC3C: snmp_free_var_internals (snmp_api.c:5076) by 0x566ED4E: snmp_free_var (snmp_api.c:5093) by 0x512950C: _expValue_evalExpr (expValue.c:409) by 0x51292F4: _expValue_evalExpr (expValue.c:375) by 0x51292F4: _expValue_evalExpr (expValue.c:375) by 0x512A8AE: expValue_evaluateExpression (expValue.c:771) by 0x512B4EF: expValueTable_getEntry (expValueTable.c:142) by 0x512C042: expValueTable_handler (expValueTable.c:267) by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) by 0x4E64B43: netsnmp_call_next_handler (agent_handler.c:645) by 0x4E56987: table_helper_handler (table.c:712) by 0x4E646A6: netsnmp_call_handler (agent_handler.c:531) Address 0x82d9068 is 8 bytes inside a block of size 1,136 free'd at 0x4C2A237: free (vg_replace_malloc.c:476) by 0x566ED5A: snmp_free_var (snmp_api.c:5094) by 0x5128F20: _expValue_evalOperator (expValue.c:303) by 0x512A6B3: _expValue_evalExpr2 (expValue.c:717) by 0x51294F6: _expValue_evalExpr (expValue.c:408) by 0x51292F4: _expValue_evalExpr (expValue.c:375) by 0x51292F4: _expValue_evalExpr (expValue.c:375) by 0x512A8AE: expValue_evaluateExpression (expValue.c:771) by 0x512B4EF: expValueTable_getEntry (expValueTable.c:142) by 0x512C042: expValueTable_handler (expValueTable.c:267) by 0x4E646A6: netsnmp_call_hanPK{0])/YYIETF-MIB-LICENSE.txtnu[MIBs included in this software taken from IETF Documents are considered Code Components in accordance with the IETF Trust License Policy, as found here: http://trustee.ietf.org/license-info/ They are available under the terms of the Simplified BSD license, a copy of which is included below. ***** Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: · Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. · Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. · Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PK{0]Q‰QQ EXAMPLE.confnu[############################################################################### # # EXAMPLE.conf: # An example configuration file for configuring the Net-SNMP agent ('snmpd') # See the 'snmpd.conf(5)' man page for details # # Some entries are deliberately commented out, and will need to be explicitly activated # ############################################################################### # # AGENT BEHAVIOUR # # Listen for connections from the local system only agentAddress udp:127.0.0.1:161 # Listen for connections on all interfaces (both IPv4 *and* IPv6) #agentAddress udp:161,udp6:[::1]:161 ############################################################################### # # SNMPv3 AUTHENTICATION # # Note that these particular settings don't actually belong here. # They should be copied to the file /var/net-snmp/snmpd.conf # and the passwords changed, before being uncommented in that file *only*. # Then restart the agent # createUser authOnlyUser MD5 "remember to change this password" # createUser authPrivUser SHA "remember to change this one too" DES # createUser internalUser MD5 "this is only ever used internally, but still change the password" # If you also change the usernames (which might be sensible), # then remember to update the other occurances in this example config file to match. ############################################################################### # # ACCESS CONTROL # # system + hrSystem groups only view systemonly included .1.3.6.1.2.1.1 view systemonly included .1.3.6.1.2.1.25.1 # Full access from the local host #rocommunity public localhost # Default access to basic system info rocommunity public default -V systemonly # Full access from an example network # Adjust this network address to match your local # settings, change the community string, # and check the 'agentAddress' setting above #rocommunity secret 10.0.0.0/16 # Full read-only access for SNMPv3 rouser authOnlyUser # Full write access for encrypted requests # Remember to activate the 'createUser' lines above #rwuser authPrivUser priv # It's no longer typically necessary to use the full 'com2sec/group/access' configuration # r[ou]user and r[ow]community, together with suitable views, should cover most requirements ############################################################################### # # SYSTEM INFORMATION # # Note that setting these values here, results in the corresponding MIB objects being 'read-only' # See snmpd.conf(5) for more details sysLocation Sitting on the Dock of the Bay sysContact Me # Application + End-to-End layers sysServices 72 # # Process Monitoring # # At least one 'mountd' process proc mountd # No more than 4 'ntalkd' processes - 0 is OK proc ntalkd 4 # At least one 'sendmail' process, but no more than 10 proc sendmail 10 1 # Walk the UCD-SNMP-MIB::prTable to see the resulting output # Note that this table will be empty if there are no "proc" entries in the snmpd.conf file # # Disk Monitoring # # 10MBs required on root disk, 5% free on /var, 10% free on all other disks disk / 10000 disk /var 5% includeAllDisks 10% # Walk the UCD-SNMP-MIB::dskTable to see the resulting output # Note that this table will be empty if there are no "disk" entries in the snmpd.conf file # # System Load # # Unacceptable 1-, 5-, and 15-minute load averages load 12 10 5 # Walk the UCD-SNMP-MIB::laTable to see the resulting output # Note that this table *will* be populated, even without a "load" entry in the snmpd.conf file ############################################################################### # # ACTIVE MONITORING # # send SNMPv1 traps trapsink localhost public # send SNMPv2c traps #trap2sink localhost public # send SNMPv2c INFORMs #informsink localhost public # Note that you typically only want *one* of these three lines # Uncommenting two (or all three) will result in multiple copies of each notification. # # Event MIB - automatically generate alerts # # Remember to activate the 'createUser' lines above iquerySecName internalUser rouser internalUser # generate traps on UCD error conditions defaultMonitors yes # generate traps on linkUp/Down linkUpDownNotifications yes ############################################################################### # # EXTENDING THE AGENT # # # Arbitrary extension commands # extend test1 /bin/echo Hello, world! extend-sh test2 echo Hello, world! ; echo Hi there ; exit 35 #extend-sh test3 /bin/sh /tmp/shtest # Note that this last entry requires the script '/tmp/shtest' to be created first, # containing the same three shell commands, before the line is uncommented # Walk the NET-SNMP-EXTEND-MIB tables (nsExtendConfigTable, nsExtendOutput1Table # and nsExtendOutput2Table) to see the resulting output # Note that the "extend" directive supercedes the previous "exec" and "sh" directives # However, walking the UCD-SNMP-MIB::extTable should still returns the same output, # as well as the fuller results in the above tables. # # "Pass-through" MIB extension command # #pass .1.3.6.1.4.1.8072.2.255 /bin/sh PREFIX/local/passtest #pass .1.3.6.1.4.1.8072.2.255 /usr/bin/perl PREFIX/local/passtest.pl # Note that this requires one of the two 'passtest' scripts to be installed first, # before the appropriate line is uncommented. # These scripts can be found in the 'local' directory of the source distribution, # and are not installed automatically. # Walk the NET-SNMP-PASS-MIB::netSnmpPassExamples subtree to see the resulting output # # AgentX Sub-agents # # Run as an AgentX master agent master agentx # Listen for network connections (from localhost) # rather than the default named socket /var/agentx/master #agentXSocket tcp:localhost:705 PK{0]3 README.mib2cnu[This README describes the ./local/mib2c script. Author: Derek Simkowiak dereks@kd-dev.com http://www.kd-dev.com (please mail questions to net-snmp-coders@lists.sourceforge.net, not to the author directly. Thanks!) Date: Wed Jan 20 02:51:06 PST 1999 ----------------------------------------------------------------------- mib2c OVERVIEW mib2c is a Perl script that takes a MIB (such as those files found in ./mibs/ ) and converts it into C code. That C code can then be used as a "template" to implement your MIB. Then, when you are done editing the C code and recompiling, the UCD-SNMP agent (snmpd) will support your MIB. mib2c takes the place of "MIB Compilers" that come with commercial SNMP agents. REQUIREMENTS/INSTALLATION mib2c requires the SNMP.pm Perl module. As of this writing the latest version of the SNMP.pm module is 1.8. The SNMP.pm module can be downloaded from CPAN at http://www.cpan.org/modules/by-module/SNMP/ ...the file that you want is probably SNMP-1.8b5.tar.gz . If you didn't know that already, most every Perl module can be downloaded from CPAN (www.cpan.org). Follow the installation instructions for the module. NOTE: If you are running Redhat Linux 5.2 (and perhaps other versions), you might get the following errors during the "make test" phase of the installation of the SNMP.pm module: [root@olly SNMP-1.8b5]# make test # This is the command... PERL_DL_NONLAZY=1 /usr/bin/perl -I./blib/arch -I./blib/lib -I/usr/lib/perl5/i386-linux/5.00404 -I/usr/lib/perl5 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/mib...............ok t/session...........FAILED tests 7-8 Failed 2/14 tests, 85.71% okay t/translate.........ok Failed Test Status Wstat Total Fail Failed List of failed ------------------------------------------------------------------------------- t/session.t 14 2 14.29% 7-8 Failed 1/3 test scripts, 66.67% okay. 2/24 subtests failed, 91.67% okay. make: *** [test_dynamic] Error 9 If the "make" went okay, then you can ignore these test failures. These indicate you don't have write access to the portions of the mib tree that the test script is trying to use. Please don't email the UCD-SNMP list with other errors regarding the SNMP.pm module. comp.lang.perl.modules is probably the most appropriate spot to discuss problems with the SNMP.pm perl module itself. Interelated problems between net-snmp and SNMP could be discussed on the net-snmp mailing lists though. USAGE mib2c takes one argument: an OID. It then traces down that OID and generates the template C code. Here is the documentation, from the top of the script: # This program, given an OID reference as an argument, creates some # template mib module files to be used with the net-snmp agent. It is # far from perfect and will not generate working modules, but it # significantly shortens development time by outlining the basic # structure. # # Its up to you to verify what it does and change the default values # it returns. # # You *must* correct the beginning of the var_XXX() function to # correctly determine mib ownership of the incoming request. FINDING YOUR MIB Before you can specify the OID for your enterprise/MIB on the command line, the script needs to be able to find your MIB so that it can read it in and generate template code. Joe Marzot (gmarzot@nortelnetworks.com) tells us: -------------------------------------- you should read (man mib_api). The default behaviour for mib loading from within the perl interface uses the environment variables described there. You can also override these and explicitly define mibdirs and load modules through the perl/SNMP api. the easiest thing to do is toss the mibs in /usr/local/share/snmp/mibs and set the env. var., MIBS, to 'ALL'. -------------------------------------- I recommend following the last two lines of advice. I simply did # cp /home/dereks/MY-MIB-FILE.txt /usr/local/share/snmp/mibs/ # export MIBS=ALL ...on my Redhat system (with a BASH shell) and it was able to find my MIB just fine. EXAMPLES Here are some examples from Wes Hardaker (wjhardaker@ucdavis.edu). He's using a C shell. Wes writes: -------------------------------------- Ok, in order to run the thing, you actually need to do something like this: setenv MIBS MY-ITEM-MIB # assumes csh mib2c itemNode Where, "itemNode" should be a node in the mib tree that you want to generate C code for. Note, pick small pieces not large ones. Yes, it will generate code for the entire mibII tree if you ask it to, in one very large mib file. Examples: % mib2c interfaces outputing to interfaces.c and interfaces.h ... depth: 3 Number of Lines Created: 178 interfaces.c 84 interfaces.h 262 total Done. % mib2c mib-2 # Don't ever do this. outputing to mib-2.c and mib-2.h ... depth: 5 Number of Lines Created: 2783 mib-2.c 617 mib-2.h 3400 total Done. It may have some sorting problems with multiple level mib tree branches being generated into one piece of code (reorder the .h file structure to be in OID lexical order if needed). -------------------------------------- WHAT TO DO WITH THE CODE THAT GETS GENERATED You will need to edit your generated code to work with your hardware. For instance, if your MIB is for a refrigerator, you will need to write the code that talks to the refridgerator (through the serial port, maybe?) in Fridge Protocol. See the files in ./agent/mibgroup/examples/ and ./agent/mibgroup/dummy/ for heavily-commented example code. Don't ask me questions about this stuff--I'm just now figuring it out myself... [NOTE: If anyone out there has tips about necessary options to ./configure, or re-compiling snmpd with custom MIB support, please add them here...] WARNING As of this writing, the mib2c compiler is a bit outdated and needs some work. Wes writes: -------------------------------------- It already needs changing, because the architecture has changed in the 3.6 line (though its backwards compatible, I'd prefer to generate code from newer models than older ones). -------------------------------------- When I asked him to elaborate on the new 3.6 archictecture, all I got was: -------------------------------------- It hopefully will be in the new documentation about mib module api that Dave Shield is putting together (which is also currently wrong, for that matter)... -------------------------------------- ...so I don't know what the hell he's talking about. SOME ERRORS AND THEIR MEANING If you get a large number of errors that look like: [...] unknown type: INTEGER for prIndex unknown type: OCTETSTR for prNames unknown type: INTEGER for prMin [...] ...then you are trying to use an old version of the mib2c script that does not support the SNMP.pm module version 1.8. Get the latest version of the script. If you get the error Couldn't find mib reference: myEnterpriseOID ...when you know that it should be finding your MIB file(s), then you forgot to put the word "END" at the very end of your MIB. (Uh...I'm not speaking from experience here. Really.) ACKNOWLEGMENTS Many thanks to the people on the UCD-SNMP mailing list (net-snmp-users@lists.sourceforge.net). In particular, many thanks to Wes Hardaker Ken McNamara Joe Marzot ...since about half this document is just cut'n'pasted from emails they sent me. Good luck with your project. Derek Simkowiak dereks@kd-dev.com http://www.kd-dev.com PK{0]!oVVCOPYINGnu[Various copyrights apply to this package, listed in various separate parts below. Please make sure that you read all the parts. ---- Part 1: CMU/UCD copyright notice: (BSD like) ----- Copyright 1989, 1991, 1992 by Carnegie Mellon University Derivative Work - 1996, 1998-2000 Copyright 1996, 1998-2000 The Regents of the University of California All Rights Reserved Permission to use, copy, modify and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of CMU and The Regents of the University of California not be used in advertising or publicity pertaining to distribution of the software without specific written permission. CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---- Part 2: Networks Associates Technology, Inc copyright notice (BSD) ----- Copyright (c) 2001-2003, Networks Associates Technology, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Networks Associates Technology, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 3: Cambridge Broadband Ltd. copyright notice (BSD) ----- Portions of this code are copyright (c) 2001-2003, Cambridge Broadband Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Cambridge Broadband Ltd. may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 4: Sun Microsystems, Inc. copyright notice (BSD) ----- Copyright (c) 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Use is subject to license terms below. This distribution may include materials developed by third parties. Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the Sun Microsystems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 5: Sparta, Inc copyright notice (BSD) ----- Copyright (c) 2003-2013, Sparta, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Sparta, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 6: Cisco/BUPTNIC copyright notice (BSD) ----- Copyright (c) 2004, Cisco, Inc and Information Network Center of Beijing University of Posts and Telecommunications. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Cisco, Inc, Beijing University of Posts and Telecommunications, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 7: Fabasoft R&D Software GmbH & Co KG copyright notice (BSD) ----- Copyright (c) Fabasoft R&D Software GmbH & Co KG, 2003 oss@fabasoft.com Author: Bernhard Penz Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Fabasoft R&D Software GmbH & Co KG or any of its subsidiaries, brand or product names may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 8: Apple Inc. copyright notice (BSD) ----- Copyright (c) 2007 Apple Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of Apple Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 9: ScienceLogic, LLC copyright notice (BSD) ----- Copyright (c) 2009, ScienceLogic, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of ScienceLogic, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 10: Lennart Poettering copyright notice (BSD-like) ----- Copyright 2010 Lennart Poettering Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ---- Part 11: IETF copyright notice (BSD) ----- Copyright (c) 2013 IETF Trust and the persons identified as authors of the code. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 12: Arista Networks copyright notice (BSD) ---- Copyright (c) 2013, Arista Networks, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Arista Networks, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 13: VMware, Inc. copyright notice (BSD) ----- Copyright (c) 2016, VMware, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of VMware, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 14: USC/Information Sciences Institute copyright notice (BSD) ----- Copyright (c) 2017-2018, Information Sciences Institute All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Information Sciences Institue nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PK{0]H README.krb5nu[This version of net-snmp supports an experimental SNMPv3 security model using Kerberos 5 for authentication. The protocol is described in an up-and-coming IETF Internet-Draft. This document describes a brief overview of the Kerberos Security Model and how to use it. DESCRIPTION: The Kerberos Security Model does not use USM; it is completely seperate and is not tied to USM in any way. It works by placing the following ASN.1 sequence inside of the SNMPv3 msgSecurityParameters: ksmSecurityParameters ::= SEQUENCE { -- The Kerberos 5 checksum type used to checksum this message ksmChecksumType INTEGER(0..2147483647), -- The actual keyed checksum data returned by Kerberos ksmChecksum OCTET STRING, -- The Kerberos 5 message (either an AP_REQ or AP_REP) ksmKerberosMsg OCTET STRING, -- The cached ticket identifier ksmCachedTicket INTEGER(0..2147483647) } Note that the whole SEQUENCE is BER encoded as an OCTET STRING. ksmChecksumType is an integer which corresponded to the checksum algorithm used to secure this message as defined by Kerberos (see section 8.3 of RFC1510). ksmChecksum is the output of the checksum algoritm defined by ksmChecksumtype (with all NULs in the space for the checksum). ksmKerberosMsg is a Kerberos 5 AP_REQ or AP_REP message, depending on whether or not it is a request or a response (AP_REQ for requests, AP_REP for responses). ksmCachedTicket is a integer which uniquely identifies a ticked already cached on the agent to save the overhead of transferring a whole AP_REQ/AP_REP. If there is no such cached ticket, it is left at zero. An agent, upon receiving a message using the KSM, will decode the AP_REQ contained within the security parameters and thus validate the client's identity. Using the subkey contained within the AP_REQ, the agent will validate the checksum (after first clearing the checksum bytes to zero), and issue a response, encoding the appropriate AP_REP message in the ksmSecurityParameters. If the securityLevel of the message is set to AuthPriv, the scopedPdu payload will be encrypted using the encryption key and algorithm of the AP_REQ subkey. Note that in this case, the msgData will be a BER-encoded OCTET STRING corresponding to the "cipher" element of the EncryptedData sequence defined in RFC 1510, section 6.1. Since this security model is experimental, the number assigned to this security model is taken from the recommendations of RFC 2271, section 5, which specify enterprise-specific Security Models of the form: SnmpSecurityModel = enterpriseID * 256 + security model number in that enterprise ID; In the case of KSM this gives us: SnmpSecurityModel = 8072 * 256 + 0 = 2066432 USAGE: To actually USE the Kerberos Security Model, do the following: 0) Install Kerberos Let it be stated up front - Installing Kerberos completely "cold", without any Kerberos experience at all, can be daunting (to say the least). If you already have a Kerberos infrastructure at your site, then all of the hard work has been done. If you do NOT, but you still want to tackle it, you might be interested in the Kerberos FAQ, which can be found at: http://www.nrl.navy.mil/CCS/people/kenh/kerberos-faq.html Currently the code in net-snmp only supports using MIT Kerberos libraries to link against (you should be able to use any kind of Kerberos server, however). 1) Compile net-snmp with Kerberos. This assumes that you already have Kerberos libraries in place. Configure net-snmp to include the Kerberos Security Model (ksm) and use --with-cflags and --with-ldflags to specify the location and names of Kerberos header files and libraries. For example, on my system I run: ./configure --with-cflags='-I/usr/krb5/include' \ --with-ldflags='-L/usr/krb5/lib -lkrb5 -lcrypto -lcom_err -R/usr/krb5/lib' Note that this is on Solaris, and that -R is required to set the correct shared library path. If you have a newer version of Kerberos, you might instead have to use: -lkrb5 -lk5crypto -lcom_err as the libraries to link against. If you get errors (for example, you get a message that says the compiler isn't working) you can check config.log for the output of the compiler. 2) Configure Kerberos and SNMP Currently, net-snmp uses the "host" principal assigned to a host. This may change in the future. You will want to create host principals of the form: host/f.q.d.n@YOUR.REALM For example: host/mydesktop.example.org@EXAMPLE.ORG and place the encryption keys for these principals on every machine you wish to run a SNMP agent (you place each key on it's corresponding machine). Your Kerberos documentation should explain how to do this (in the case of MIT Kerberos, you want to look at the "ktadd" command inside of kadmin). If you have a Kerberos infrastructure, you likely already have these principals in place on your systems. If you're installing Kerberos for the first time as well, you also need to create client principals corresponding to your userid. See your Kerberos documentation. On the SNMP _agent_ side, you'll want to place in your snmpd.conf file (the one that lives in /usr/local/share/snmp/snmpd.conf, or whereever you have configured on your system): rwuser -s ksm userid@YOUR.REALM to allow the Kerberos principal 'userid@YOUR.REALM' read/write access to the MIB tree. 3) Run the agent and client applications Note that before you do any of this, you will have to have valid Kerberos credentials (generally acquired with the "kinit" program). The agent should run without any additional flags. You should run the client apps with the following flags: -Y defSecurityModel=ksm -v 3 -u username -l authNoPriv for example: snmpget -v 3 -Y defSecurityModel=ksm -u myname -l authNoPriv testhost \ system.sysDescr.0 If you wish to encrypt the payload, change the -l argument to "authPriv". If you run into problems, you can add the -Dksm flag to both the manager applications and the agent to get more detailed Kerberos error messages. Note that this setup assumes a working Kerberos infrastructure; if you run into problems, check to make sure Kerberos is working for you. PK{0] README.snmpv3nu[README.snmpv3 ------------- How to setup SNMPv3, a very brief document for Dave to elaborate and do a better job on since I suck at writing documentation and he doesn't ;-) --Wes: Note: SHA authentication and DES/AES encryption support is only available if you have OpenSSL installed or if you've compiled using --with-openssl=internal. If you use --with-openssl=internal please read the documentation in snmplib/openssl/README for important details. Note: encryption support now *is* enabled in the binary releases downloadable from the net-snmp web site. Note: this description assumes you're using the software compiled from source, and so installed using the default prefix location (/usr/local). If you're working with a vendor-provided system, or have configured things with a different prefix, you'll need to adjust locations accordingly. CREATING THE FIRST USER: ------------------------ First, you need to create a new snmpv3 user and give them rights to do things: net-snmp-config --create-snmpv3-user -a "my_password" myuser WARNING: SNMPv3 pass phrases must be at least 8 characters long! The above line creates the user "myuser" with a password of "my_password" (and uses MD5 and DES for protection). (Note that encryption support isn't enabled in the binary releases downloadable from the net-snmp web site.) net-snmp-config will also add a line to your snmpd.conf file to let that user have read/write access to your agent. You may want to change this in your snmpd.conf file (see the snmpd.conf manual page). Run net-snmp-config --help for more information about it. Start the agent and test your setup: /usr/local/sbin/snmpd [...wait a few seconds... It will run in the background and return you to your shell immediately.] snmpget -v 3 -u myuser -l authNoPriv -a MD5 -A my_password localhost sysUpTime.0 [ this should return information about how long your agent has been up] snmpget -v 3 -u myuser -l authPriv -a MD5 -A my_password -x DES -X my_password localhost sysUpTime.0 [ this should return similar information, but encrypts the transmission ] CREATING A SECOND USER: ----------------------- Start the agent (if you didn't do so above). You can create as many users as you like using the above method, but this details another way of doing it while the agent is running by modifying the user database using the snmp protocol itself: Now, lets create a second user using the first user (just for fun) for both authentication purposes and as a template (or "cloning source"): snmpusm -v 3 -u myuser -l authNoPriv -a MD5 -A my_password localhost create wes myuser The above should have created the user "wes" with the same password as the "myuser" user. So then, you need to change his password using: snmpusm -v 3 -u wes -l authNoPriv -a MD5 -A my_password localhost passwd my_password new_passphrase See, wasn't that easy? You can now create users. Wheeee.... But, you'll have to add a configuration line that allows them access to do things. Do this with another "rwuser" line in your /usr/local/share/snmp/snmpd.conf file (you'll need to stop and start the agent again, or send the agent a SIGHUP signal): rwuser wes Or, optional use the "rouser" token instead of the "rwuser" token to only grant them read-only access. Now, test your new user: snmpget -v 3 -u wes -l authNoPriv -a MD5 -A new_passphrase localhost sysUpTime.0 FURTHER STUDIES: --------------- Tired of all those command line authentication options? ---------------------------------------- put something like this in your $HOME/.snmp/snmp.conf file (make it readable only by you!!!): defSecurityName wes defContext "" defAuthType MD5 defSecurityLevel authNoPriv defAuthPassphrase new_passphrase defVersion 3 And this is in place the last of the above example lines boils down to: snmpget localhost sysUpTime.0 Which is about as simple as I can make it for ya ;-) PK{0]66READMEnu[ README file for net-snmp Version: 5.8 DISCLAIMER The Authors assume no responsibility for damage or loss of system performance as a direct or indirect result of the use of this software. This software is provided "as is" without express or implied warranty. TABLE OF CONTENTS Disclaimer Table Of Contents Introduction * Supported Architectures Availability Web Page * Installation Copying And Copyrights * Frequently Asked Questions Helping Out * Code Update Announcements * Mailing Lists Agent Extensibility Example Agent Configuration and Usage Configuration Submitting Bug Reports Closing Thanks * = Required Reading. INTRODUCTION This package was originally based on the CMU 2.1.2.1 snmp code. It has been greatly modified, restructured, enhanced and fixed. It hardly looks the same as anything that CMU has ever released. It was renamed from cmu-snmp to ucd-snmp in 1995 and later renamed from ucd-snmp to net-snmp in November 2000. This README file serves as a starting place to learn about the package, but very little of the documentation is contained within this file. The FAQ is an excellent place to start as well. Additionally, there are a bunch of README files for specific architectures and specific features. You might wish to look at some of these other files as well. SUPPORTED ARCHITECTURES Please see the FAQ for this information. Please let us know if you compile it on other OS versions and it works for you so we can add them to the above list. Porting: Please! read the PORTING file. Also note that many architecture have architecture specific README files, so you should check to see if there is one appropriate to your platform. AVAILABILITY Download: - http://www.net-snmp.org/download/ Web page: - http://www.net-snmp.org/ Project Wiki: - http://www.net-snmp.org/wiki/ Sourceforge Project page: - http://sourceforge.net/projects/net-snmp The old ucd-snmp.ucdavis.edu web site and ftp server is now offline and should not be accessed any longer. WEB PAGES http://www.net-snmp.org/ http://sourceforge.net/projects/net-snmp http://www.net-snmp.org/wiki/ INSTALLATION See the INSTALL file distributed with this package. COPYING AND COPYRIGHTS See the COPYING file distributed with this package. FREQUENTLY ASKED QUESTIONS See the FAQ file distributed with this package. This is also available on the project Wiki at http://www.net-snmp.org/wiki/index.php/FAQ so that the wider Net-SNMP community can help maintain it! HELPING OUT This is a project worked on by people around the net. We'd love your help, but please read the PORTING file first. Also, subscribe to the net-snmp-coders list described below and mention what you're going to work on to make sure no one else is already doing so! You'll also need to keep up to date with the latest code snap shot, which can be obtained from CVS using the information found at http://www.net-snmp.org/cvs/. Contributions to the Net-SNMP source code in any form are greatly appreciated. We expect the parties providing such contributions to have the right to contribute them to the Net-SNMP project or that the parties that do have the right have directed the person submitting the contribution to do so. In addition, all contributors need to be aware that if the contribution is accepted and incorporated into the Net-SNMP project, it will be redistributed under the terms of the license agreement used for the entire body of work that comprises the Net-SNMP project (see the COPYING file for details). If this license agreement ever changes the contribution will continue to be released under any new licenses as well. Thank you, in advance, for your gracious contributions. CODE UPDATE ANNOUNCEMENTS See the NEWS file and the ChangeLog file for details on what has changed between releases. We hate broadcasting announce messages to other mailing lists and newsgroups, so there is a mailing list set up to handle release announcements. Any time we put new software out for ftp, we'll mail this fact to net-snmp-announce@lists.sourceforge.net. See the MAILING LISTS section described below to sign up for these announcements. We will post new announcements on a very infrequent basis to the other channels (the other snmp mailing lists and newsgroups like comp.protocols.snmp), but only for major code revisions and not for bug-fix patches or small feature upgrades. MAILING LISTS The lists: A number of mailing lists have been created for support of the project: The main ones are: net-snmp-announce@lists.sourceforge.net -- For official announcements net-snmp-users@lists.sourceforge.net -- For usage discussions net-snmp-coders@lists.sourceforge.net -- For development discussions The -coders list is intended for discussion on development of code that will be shipped as part of the package. The -users list is for general discussion on configuring and using the package, including issues with coding user-developed applications (clients, managers, MIB modules, etc). Please do *NOT* send messages to both -users and -coders lists. This is completely unnecessary, and simply serves to further overload (and annoy) the core development team. If in doubt, just use the -users list. The other lists of possible interest are: net-snmp-cvs@lists.sourceforge.net -- For cvs update announcements net-snmp-bugs@lists.sourceforge.net -- For Bug database update announcements net-snmp-patches@lists.sourceforge.net -- For Patch database update announcements Please do NOT post messages to these lists (or to the announce list above). Bug reports and Patches should be submitted via the Source Forge tracker system. See the main project web pages for details. To subscribe to any of these lists, please see: http://www.net-snmp.org/lists/ Archives: The archives for these mailing lists can be found by following links at http://www.net-snmp.org/lists/ AGENT EXTENSIBILITY The agent that comes with this package is extensible through use of shell scripts and other methods. See the configuration manual pages (like snmpd.conf) and run the snmpconf perl script for further details. You can also extend the agent by writing C code directly. The agent is extremely modular in nature and you need only create new files, re-run configure and re-compile (or link against its libraries). No modification of the distributed source files are necessary. See the following files for details on how to go about this: http://www.net-snmp.org/tutorial-5/toolkit/, agent/mibgroup/examples/*.c Also, see the local/mib2c program and its README file for help in turning a textual mib description into a C code template. We now support AgentX for subagent extensibility. The net-snmp agent can run as both a master agent and a subagent. Additionally, a toolkit is provided that enables users of it to easily embed a agentx client into external applications. See the tutorial at http://www.net-snmp.org/tutorial-5/toolkit/ for an example of how go about doing this. CONFIGURATION See the man/snmp.conf.5 manual page. For the agent, additionally see the man/snmpd.conf.5 manual page. For the snmptrapd, see the man/snmptrapd.conf.5 manual page. You can also run the snmpconf perl script to help you create some of these files. SUBMITTING BUG REPORTS Important: *Please* include what version of the net-snmp (or ucd-snmp) package you are using and what architecture(s) you're using, as well as detailed information about exactly what is wrong. To submit a bug report, please use the web interface at http://www.net-snmp.org/bugs/. It is a full-fledged bug-tracking system that will allow you to search for already existing bug reports as well as track the status of your report as it is processed by the core developers. If you intend to submit a patch as well, please read the PORTING file before you do so and then submit it to http://www.net-snmp.org/patches/. CLOSING We love patches. Send some to us! But before you do, please see the 'PORTING' file for information on helping us out with the process of integrating your patches (regardless of whether its a new feature implementation or a new port). Also, We're interested if anyone actually uses/likes/hates/whatever this package... Mail us a note and let us know what you think of it! Have fun and may it make your life easier, The net-snmp developers THANKS The following people have contributed various patches and improvements. To them we owe our deepest thanks (and you do too!): Wes Hardaker Steve Waldbusser Dan A. Dickey Dave Shield Giovanni S. Marzot Niels Baggesen Simon Leinen David T. Perkins Mike Perik Sanjai Narain francus@metsny.delphi.com Gary Palmer Marc G. Fournier Gary A. Hayward Jennifer Bray Philip Guenther Elwyn B Davies Simon Burge David Paul Zimmerman Alan Batie Michael Douglass Ted Rule Craig Bevins Arther Hyun Cristian Estan Eugene Polovnikov Jakob Ellerstedt Michael J. Slifcak Jonas Olsson James H. Young Jeff Johnson Markku Laukkanen Derek Simkowiak David F. Newman Nick Amato Mike Baer Patrick Lawrence Russ Mundy Olafur Gudmundsson David Reeder Ed Lewis Bill Babson Chris Smith Mike Michaud Andy Hood Robert Story Bert Driehuis Juergen Schoenwaelder Frank Strauss Ragnar Kjørstad Jochen Kmietsch Jun-ichiro itojun Hagino John L Villalovos Christoph Mammitzsch Arne Oesleboe Jeff Cours Karl Schilke John Naylon Ken Hornstein Martin Oldfield Harrie Hazewinkel Mark Ferlatte Marus Meissner Stephan Wenzer Ron Mevissen T.J. Mather Craig Setera Katsuhisa ABE Axel Kittenberger Johannes Schmidt-Fischer Jeffrey Watson Bruce Shaw Stefan Radman Stephen J. Friedl Alex Burger Christophe Varoqui Srikanth Pindiproli Kevin Graham Xiaofeng Ling Brandon Knitter Andrew Findlay Ron Tabor Peter Warasin Bob Rowlands Peter Hicks Andy Smith Nick Barkas Noah Friedman Geert De Peuter Magnus Fromreide Marcus Meissner Andrew Rucker Jones Dai.H. Thomas Anders Vladislav Bogdanov Peter Martin Thomas Lackey Joe Buehler Anders Persson Rojer Bart Van Assche Pablo Carboni Bill Fenner Brian Sipos Eugene M. Kim Anders Wallin Andrew Stormont Keith Mendoza We've probably forgotten people on this list. Let us know if you've contributed code and we've left you out. PK{0]o PORTINGnu[--- INTRODUCTION Just a quick note on porting and sending me patches: First off, you probably should subscribe to net-snmp-coders@lists.sourceforge.net by sending a message to net-snmp-coders-request@lists.sourceforge.net with a subject line of subscribe. This is a mailing list to discuss all oft the coding aspects of the project. Additionally, you should probably be developing against the latest snapshot of the source code, which can be obtained through the net-snmp cvs server. Details can be found at http://www.net-snmp.org/cvs/. If you send patches to us, it would greatly help us if you sent them to us based on the current checked out copy from CVS. To do this, send us the output of "cvs diff -u" run in the top level net-snmp source tree after you have modified the files that will fix the problem or add the feature you're submitting the patch for. Quite a while back I started using the GNU autoconf testing suite to greatly enhance portability. Because of this porting to new architectures is much easier than before. However, new people porting the package to new architectures rarely take advantage of this setup and send me patches with lots of '#ifdef ARCH' type C code in it. Let me say up front, I *hate* this type of coding now (even though I used to use it a lot). What is better is to check for the necessary functionality using the configure script and then use the results of those tests. To do this, you need to install the GNU 'autoconf' package which also requires the GNU 'm4' (gm4) package as well. This double installation is extremely easy and shouldn't take you more than 15 minutes max. After that, modify the configure.in and acconfig.h files as needed instead of modifying the config.h or configure files directly. The Makefile will re-produce these files from the first two. Worst case: Don't put in #ifdef architecture style statements. Rather, create a new define in the s/ and m/ system specific header files and use those defines to test against in the C code. This should only be done for things that can't be checked using configure though. Some autoconf examples: --- HEADER FILES In configure.in: AC_CHECK_HEADERS(headdir/header.h) Then in your source code: #ifdef HAVE_HEADDIR_HEADER_H #include #ENDIF --- LIBRARY ROUTIENS In configure.in: AC_CHECK_LIB(libexample, example_function) Thats it. The Makefiles will automatically link against -llibexample if example_function is found in the library. --- FUNCTION CHECKS In configure.in: AC_CHECK_FUNCS(example_function) In source code: #ifdef HAVE_EXAMPLE_FUNCTION /* use it */ #endif --- STRUCTURE MEMBER CHECKS In configure.in: AC_CHECK_MEMBERS([struct STRUCTURE.MEMBER],,,[[ #include lines ]]) ^^^^^^^^^ ^^^^^^ (change) In source code: #ifdef HAVE_STRUCT_STRUCTURE_MEMBER /* use it */ #endif --- READ THE MANUAL The GNU autoconf info files are extremely well written and easy to follow. Please check them out. I'd be happy to help you through anything you don't understand or through more complex examples (eg, checking for structure parts or existance). I'd be far less happy to get patches ignoring the above request. If you simple can't abide by this, please send the patches anyway, but it'll just take me longer to get them applied. Submit the patch to http://www.net-snmp.org/patches/. Please include what version of the net-snmp package it was applied to and state the arcitectures you have tested it on. Thanks a lot for the consideration, Wes PK{0]J kkTODOnu[TODO list of possible projects/developments/etc =============================================== APIs: Perl (basically OK - may need a review/update) PHP (PHP-shipped API is out of date, needs reworking) Java (see netsnmpj) Tk/Tcl WinSNMP Python (yapsnmp? / snmpy?) #Net Agent MIBs: Notification Filtering Community MIB Proxy MIB (extended to support proxying of subtrees) RMON/RMON2 MIB-2 updates (in hand) IPv6 Firewall (inc. connection tracking) DisMan: monitor (done?) RemOps (preliminary implementation) Tunnel WWW-MIB Hardware Abstraction Layer: HostRes (convert to use HAL and clean up - in progress) UCDavis (convert to use HAL and update structures - in progress) Extensibility: AgentX (reasonably stable now) SMUX (?obsolete?) embedded Perl (done? in hand?) " Python DisMan script MIB Extend scripts (new, so will need to bed down) Pass scripts (support SNMPv2 exceptions/errors) DLMod (OK, but MIB i/f not robust) Library: Threading Debugging (heirarchical) Config (split syntax & processing, persist/read-only/etc) SecModels: Kerberos (?done) SBSM (?in hand) Pre-compiled MIBs Traps: Separate thread in agen Pluggable modules (?done) Dynamic loading Persistent connection Threaded handler Documentation: Tutorials Extending the agent Agent internals PK{0];55 README.threadnu[Improved Error Reporting and Thread-Safe Use of the SNMP Library There is a need in some environments to support multiple threads in a single application. The SNMP Library provides the Single Session functions which support thread-safe operation when certain precautions are taken. This document describes the operation of the SNMP Library with a focus on its session management functions. The Traditional API and the Single API functions are compared and contrasted. A working understanding of the CMU or UCD SNMP Library API is recommended to fully appreciate the concepts discussed. The document ends with a list of restrictions for using the Single API in a multi-threaded application. Unfortunately, the SNMPv3 support was added about the same time as the thread support and since they occurred in parallel the SNMPv3 support was never checked for multi-threading correctness. It is most likely that it is not thread-safe at this time. ***** IMPORTANT ANNOUNCEMENT ***** To the point, no resource locks are applied within the SNMP Library. The APDU encoding and some session management functions can be used in thread-safe manners. The MIB file parsing is not thread-safe. The Single Session API was made available in November 1998. Existing applications use the Traditional API, which is not thread-safe. The thread-safe considerations are discussed throughout this document. The research and development of the Single Session API that I've completed was wholly funded by my employer, Internet Security Systems, Inc. and is distributed freely to the Internet community. -Mike Slifcak, 23 April 1999 09 July 1999 Removed references to snmp_synch_setup and snmp_synch_reset Availability The Single Session API is integrated into the currently available versions of the CMU SNMP library and the UC-Davis SNMP package. ftp://ftp.net.cmu.edu/pub/snmp/cmu-snmp-V1.13.tar.gz and later Read : snmp_sess_api.3, Changes.SingleSession ftp://ucd-snmp.ucdavis.edu/ucd-snmp-3.6.tar.gz and later Read : snmp_sess_api.3, README.thread (after version 3.6.1) Both libraries work equally well in Windows NT and various UNIX platforms. Please read this document and refer to the snmp_sess_api section 3 manual page. Glossary of Terms APDU Application Protocol Data Unit API Application Programming Interface CMU Carnegie-Mellon University, Pittsburgh, PA. Library The SNMP library; Both CMU and UCD versions are applicable. Session Concept embodying the management of transacting SNMP APDUS. SNMP Simple Network Management Protocol UCD University of California at Davis, CA. Introduction The Library extends the UNIX file concept (open, close, read, write) to a Session. Opening a Session binds a local socket to a well-known port and creates internal structures to help with controlling the transaction of SNMP APDUs. Closing a Session releases the memory and system resources used for these purposes. Since the mid-1980s, many SNMP applications have used the Traditional Session API to transact SNMP APDUs between the local host and SNMP-enabled devices. The Traditional Session API does not support multi-threaded applications: 1) There are no resource locks to prevent exposing the Library's global data resources to corruption in a multi-threaded application; 2) The Traditional API functions that receive SNMP APDUs do not provide an interface for one of many sessions; 3) Errors discovered by the Library are communicated through global data structures and are not associated with the session in which the error occurred. The Single Session API provides these capabilities: 1) Manage a single SNMP session safely, in multi-threaded or non-threaded applications, by avoiding access to data structures that the Traditional Session API may share between Sessions; 2) Associate errors with the session context for threaded and non-threaded applications. Contrasting and Comparing Traditional API and Single API The Traditional API uses the struct snmp_session pointer returned from snmp_open() to identify one SNMP session. The Single API uses the opaque pointer returned from snmp_sess_open() to identify one SNMP session. Helpful Hint : The Library copies the contents of the structure which is input to snmp_open() and snmp_sess_open(). Once copied, changing that input structure's data has no effect on the opened SNMP Session. The Traditional API uses the snmp_error() function to identify any library and system errors that occurred during the processing for one SNMP session. The Single API uses snmp_sess_error() for the same purpose. The Traditional API manages the private Sessions list structure; adding to the list during snmp_open(), removing during snmp_close. With few exceptions, the Traditional API calls the Single API for each session that appears on the Sessions list. The Traditional API reads from all Sessions on the Sessions list; The Single API does not use the Sessions list. The Single API can read from only one Session. Helpful Hint : This is the basis for thread-safe-ness of the Library. There are no resource locks applied. Using the Single API A multi-threaded application that deploys the SNMP Library should should complete all MIB file parsing before additional threads are activated. Drawing from the parsed contents of the MIB does not incur any data corruption exposure once the internal MIB structures are initialised. The application may create threads such that a single thread may manage a single SNMP session. The thread should call snmp_sess_init() to prepare a struct snmp_session structure. The thread can adjust session parameters such as the remote UDP port or the local UDP port, which must be set prior to invoking snmp_sess_open(). The first call to snmp_sess_init() initialises the SNMP Library, including the MIB parse trees, before any SNMP sessions are created. Applications that call snmp_sess_init() do not need to read MIBs nor setup environment variables to utilize the Library. After the struct snmp_session is setup, the thread must call snmp_sess_open() to create an SNMP session. If at any time the thread must change the Session configuration, snmp_sess_session() returns the pointer to the internal configuration structure (a struct snmp_session, copied from snmp_sess_open). The thread can adjust parameters such as the session timeout or the community string with this returned struct snmp_session pointer. Changes to the remote or local port values have no effect on an opened Session. The thread can build PDUs and bind variables to PDUs, as it performs its duties. The thread then calls snmp_sess_send() or snmp_sess_async_send() to build and send an SNMP APDU to the remote device. If a Get-Response-PDU is expected, the thread should call snmp_sess_synch_response() instead. When the thread is finished using the session, it must free the resources that the Library used to manage the session. Finally, the thread must call snmp_sess_close() to end the Session. Snmp_sess_init(), snmp_open(), and snmp_sess_open() must use the same calling parameter for a given Session. Other methods should use only the returned parameter from snmp_open() and snmp_sess_open() to access the opened SNMP Session. Error Processing Two calls were added : snmp_error() and snmp_sess_error() return the "errno" and "snmp_errno" values from the per session data, and a string that describes the errors that they represent. The string must be freed by the caller. Use snmp_error() to process failures after Traditional API calls, or snmp_sess_error() to process failure after Single API calls. In the case where an SNMP session could not be opened, call snmp_error() using the struct snmp_session supplied to either snmp_open() or snmp_sess_open(). The following variables and functions are obsolete and may create problems in a multi-threaded application : int snmp_errno char * snmp_detail snmp_set_detail() snmp_api_errstring() Function Summary The functions in the following table are functionally equivalent, with the exception of these behaviors: - The Traditional API manages many sessions - The Traditional API passes a struct snmp_session pointer, and touches the Sessions list - The Single API manages only one session - The Single API passes an opaque pointer, and does not use Sessions list Traditional Single Comment =========== ============== ======= snmp_sess_init snmp_sess_init Call before either open snmp_open snmp_sess_open Single not on Sessions list snmp_sess_session Exposes snmp_session pointer snmp_send snmp_sess_send Send one APDU snmp_async_send snmp_sess_async_send Send one APDU with callback snmp_select_info snmp_sess_select_info Which session(s) have input snmp_read snmp_sess_read Read APDUs snmp_timeout snmp_sess_timeout Check for timeout snmp_close snmp_sess_close Single not on Sessions list snmp_synch_response snmp_sess_synch_response Send/receive one APDU snmp_error snmp_sess_error Get library,system errno Example 1 : Traditional API use. #include "snmp_api.h" ... int liberr, syserr; char *errstr; struct snmp_session Session, *sptr; ... snmp_sess_init(&Session); Session.peername = "foo.bar.net"; sptr = snmp_open(&Session); if (sptr == NULL) { /* Error codes found in open calling argument */ snmp_error(&Session, &liberr, &syserr, &errstr); printf("SNMP create error %s.\n", errstr); free(errstr); return 0; } /* Pass sptr to snmp_error from here forward */ ... /* Change the community name */ free(sptr->community); sptr->community = strdup("public"); sptr->community_len = strlen("public"); ... if (0 == snmp_send(sptr, pdu)) { snmp_error(sptr, &liberr, &syserr, &errstr); printf("SNMP write error %s.\n", errstr); free(errstr); return 0; } snmp_close(sptr); Example 2 : Single API use. #include "snmp_api.h" ... int liberr, syserr; char *errstr; void *sessp; /* <-- an opaque pointer, not a struct pointer */ struct snmp_session Session, *sptr; ... snmp_sess_init(&Session); Session.peername = "foo.bar.net"; sessp = snmp_sess_open(&Session); if (sessp == NULL) { /* Error codes found in open calling argument */ snmp_error(&Session, &liberr, &syserr, &errstr); printf("SNMP create error %s.\n", errstr); free(errstr); return 0; } sptr = snmp_sess_session(sessp); /* <-- get the snmp_session pointer */ /* Pass sptr to snmp_sess_error from here forward */ ... /* Change the community name */ free(sptr->community); sptr->community = strdup("public"); sptr->community_len = strlen("public"); ... if (0 == snmp_sess_send(sessp, pdu)) { snmp_sess_error(sessp, &liberr, &syserr, &errstr); printf("SNMP write error %s.\n", errstr); free(errstr); return 0; } snmp_sess_close(sessp); Example 3. Differences Between Traditional API and Single API Usage 5a6 > void *sessp; /* <-- an opaque pointer, not a struct pointer */ 11,13c12,14 < sptr = snmp_open(&Session); < if (sptr == NULL) { --- > sessp = snmp_sess_open(&Session); > if (sessp == NULL) { 19c20,22 < /* Pass sptr to snmp_error from here forward */ --- > sptr = snmp_sess_session(sessp); /* <-- get the snmp_session pointer */ > > /* Pass sptr to snmp_sess_error from here forward */ 26,27c29,30 < if (0 == snmp_send(sptr, pdu)) { < snmp_error(sptr, &liberr, &syserr, &errstr); --- > if (0 == snmp_sess_send(sessp, pdu)) { > snmp_sess_error(sessp, &liberr, &syserr, &errstr); 33c36 < snmp_close(sptr); --- > snmp_sess_close(sessp); Restrictions on Multi-threaded Use of the SNMP Library 1. Invoke SOCK_STARTUP or SOCK_CLEANUP from the main thread only. 2. The MIB parsing functions use global shared data and are not multi-thread safe when the MIB tree is under construction. Once the tree is built, the data can be safely referenced from any thread. There is no provision for freeing the MIB tree. Suggestion: Read the MIB files before an SNMP session is created. This can be accomplished by invoking snmp_sess_init from the main thread and discarding the buffer which is initialised. 3. Invoke the SNMPv2p initialisation before an SNMP session is created, for reasons similar to reading the MIB file. The SNMPv2p structures should be available to all SNMP sessions. CAUTION: These structures have not been tested in a multi-threaded application. 4. Sessions created using the Single API do not interact with other SNMP sessions. If you choose to use Traditional API calls, call them from a single thread. The Library cannot reference an SNMP session using both Traditional and Single API calls. 5. Using the callback mechanism for asynchronous response PDUs requires additional caution in a multi-threaded application. This means a callback function probably should probably not use Single API calls to further process the session. 6. Each call to snmp_sess_open() creates an IDS. Only a call to snmp_sess_close() releases the resources used by the IDS. PK{0]9z z passtestnuȯ#!/bin/sh -f PLACE=".1.3.6.1.4.1.8072.2.255" # NET-SNMP-PASS-MIB::netSnmpPassExamples REQ="$2" # Requested OID # # Process SET requests by simply logging the assigned value # Note that such "assignments" are not persistent, # nor is the syntax or requested value validated # if [ "$1" = "-s" ]; then echo $* >> /tmp/passtest.log exit 0 fi # # GETNEXT requests - determine next valid instance # if [ "$1" = "-n" ]; then case "$REQ" in $PLACE| \ $PLACE.0| \ $PLACE.0.*| \ $PLACE.1) RET=$PLACE.1.0 ;; # netSnmpPassString.0 $PLACE.1.*| \ $PLACE.2| \ $PLACE.2.0| \ $PLACE.2.0.*| \ $PLACE.2.1| \ $PLACE.2.1.0| \ $PLACE.2.1.0.*| \ $PLACE.2.1.1| \ $PLACE.2.1.1.*| \ $PLACE.2.1.2| \ $PLACE.2.1.2.0) RET=$PLACE.2.1.2.1 ;; # netSnmpPassInteger.1 $PLACE.2.1.2.*| \ $PLACE.2.1.3| \ $PLACE.2.1.3.0) RET=$PLACE.2.1.3.1 ;; # netSnmpPassOID.1 $PLACE.2.*| \ $PLACE.3) RET=$PLACE.3.0 ;; # netSnmpPassTimeTicks.0 $PLACE.3.*| \ $PLACE.4) RET=$PLACE.4.0 ;; # netSnmpPassIpAddress.0 $PLACE.4.*| \ $PLACE.5) RET=$PLACE.5.0 ;; # netSnmpPassCounter.0 $PLACE.5.*| \ $PLACE.6) RET=$PLACE.6.0 ;; # netSnmpPassGauge.0 *) exit 0 ;; esac else # # GET requests - check for valid instance # case "$REQ" in $PLACE.1.0| \ $PLACE.2.1.2.1| \ $PLACE.2.1.3.1| \ $PLACE.3.0| \ $PLACE.4.0| \ $PLACE.5.0| \ $PLACE.6.0) RET=$REQ ;; *) exit 0 ;; esac fi # # "Process" GET* requests - return hard-coded value # echo "$RET" case "$RET" in $PLACE.1.0) echo "string"; echo "Life, the Universe, and Everything"; exit 0 ;; $PLACE.2.1.2.1) echo "integer"; echo "42"; exit 0 ;; $PLACE.2.1.3.1) echo "objectid"; echo "$PLACE.99"; exit 0 ;; $PLACE.3.0) echo "timeticks"; echo "363136200"; exit 0 ;; $PLACE.4.0) echo "ipaddress"; echo "127.0.0.1"; exit 0 ;; $PLACE.5.0) echo "counter"; echo "42"; exit 0 ;; $PLACE.6.0) echo "gauge"; echo "42"; exit 0 ;; *) echo "string"; echo "ack... $RET $REQ"; exit 0 ;; # Should not happen esac PK{0]( ipf-mod.plnu[#!/usr/bin/perl -s ## ## IP Filter UCD-SNMP pass module ## ## Allows read IP Filter's tables (In, Out, AccIn, AccOut), ## fetching rules, hits and bytes (for accounting tables only). ## ## Author: Yaroslav Terletsky ## Date: $ Tue Dec 1 10:24:08 EET 1998 $ ## Version: 1.1a # Put this file in /usr/local/bin/ipf-mod.pl and then add the following # line to your snmpd.conf file (without the # at the front): # # pass .1.3.6.1.4.1.2021.13.2 /usr/local/bin/ipf-mod.pl # enterprises.ucdavis.ucdExperimental.ipFilter = .1.3.6.1.4.1.2021.13.2 # ipfInTable.ipfInEntry.ipfInIndex integer = 1.1.1 # ipfInTable.ipfInEntry.ipfInRule string = 1.1.2 # ipfInTable.ipfInEntry.ipfInHits counter = 1.1.3 # ipfOutTable.ipfOutEntry.ipfOutIndex integer = 1.2.1 # ipfOutTable.ipfOutEntry.ipfOutRule string = 1.2.2 # ipfOutTable.ipfOutEntry.ipfOutHits counter = 1.2.3 # ipfAccInTable.ipfAccInEntry.ipfAccInIndex integer = 1.3.1 # ipfAccInTable.ipfAccInEntry.ipfAccInRule string = 1.3.2 # ipfAccInTable.ipfAccInEntry.ipfAccInHits counter = 1.3.3 # ipfAccInTable.ipfAccInEntry.ipfAccInBytes counter = 1.3.4 # ipfAccOutTable.ipfAccOutEntry.ipfAccOutIndex integer = 1.4.1 # ipfAccOutTable.ipfAccOutEntry.ipfAccOutRule string = 1.4.2 # ipfAccOutTable.ipfAccOutEntry.ipfAccOutHits counter = 1.4.3 # ipfAccOutTable.ipfAccOutEntry.ipfAccOutBytes counter = 1.4.4 # variables types %type = ('1.1.1', 'integer', '1.1.2', 'string', '1.1.3', 'counter', '2.1.1', 'integer', '2.1.2', 'string', '2.1.3', 'counter', '3.1.1', 'integer', '3.1.2', 'string', '3.1.3', 'counter', '3.1.4', 'counter', '4.1.1', 'integer', '4.1.2', 'string', '4.1.3', 'counter', '4.1.4', 'counter'); # getnext sequence %next = ('1.1.1', '1.1.2', '1.1.2', '1.1.3', '1.1.3', '2.1.1', '2.1.1', '2.1.2', '2.1.2', '2.1.3', '2.1.3', '3.1.1', '3.1.1', '3.1.2', '3.1.2', '3.1.3', '3.1.3', '3.1.4', '3.1.4', '4.1.1', '4.1.1', '4.1.2', '4.1.2', '4.1.3', '4.1.3', '4.1.4'); # ipfilter's commands to fetch needed information $ipfstat_comm="/sbin/ipfstat"; $ipf_in="$ipfstat_comm -ih 2>/dev/null"; $ipf_out="$ipfstat_comm -oh 2>/dev/null"; $ipf_acc_in="$ipfstat_comm -aih 2>/dev/null"; $ipf_acc_out="$ipfstat_comm -aoh 2>/dev/null"; $OID=$ARGV[0]; $IPF_OID='.1.3.6.1.4.1.2021.13.2'; $IPF_OID_NO_DOTS='\.1\.3\.6\.1\.4\.1\.2021\.13\.2'; # exit if OID is not one of IPF-MIB's exit if $OID !~ /^$IPF_OID_NO_DOTS(\D|$)/; # get table, entry, column and row numbers $tecr = $OID; $tecr =~ s/^$IPF_OID_NO_DOTS(\D|$)//; ($table, $entry, $col, $row, $rest) = split(/\./, $tecr); # parse 'get' request if($g) { # exit if OID is wrong specified if(!defined $table or !defined $entry or !defined $col or !defined $row or defined $rest) { print "[1] NO-SUCH NAME\n" if $d; exit; } # get the OID's value $value = &get_value($table, $entry, $col, $row); print "value=$value\n" if $d; # exit if OID does not exist print "[2] NO-SUCH NAME\n" if $d and !defined $value; exit if !defined $value; # set ObjectID and reply with response $tec = "$table.$entry.$col"; $ObjectID = "${IPF_OID}.${tec}.${row}"; &response; } # parse 'get-next' request if($n) { # set values if 0 or unspecified $table = 1, $a = 1 if !$table or !defined $table; $entry = 1, $a = 1 if !$entry or !defined $entry; $col = 1, $a = 1 if !$col or !defined $col; $row = 1, $a = 1 if !$row or !defined $row; if($a) { # get the OID's value $value = &get_value($table, $entry, $col, $row); print "value=$value\n" if $d; # set ObjectID and reply with response $tec = "$table.$entry.$col"; $ObjectID = "${IPF_OID}.${tec}.${row}"; &response; } # get next OID's value $row++; $value = &get_value($table, $entry, $col, $row); # choose new table/column if rows exceeded if(!defined $value) { $tec = "$table.$entry.$col"; $tec = $next{$tec} if !$a; $table = $tec; $entry = $tec; $col = $tec; $table =~ s/\.\d\.\d$//; $entry =~ s/^\d\.(\d)\.\d$/$1/; $col =~ s/^\d\.\d\.//; $row = 1; # get the OID's value $value = &get_value($table, $entry, $col, $row); print "value=$value\n" if $d; } # set ObjectID and reply with response $tec = "$table.$entry.$col"; $ObjectID = "${IPF_OID}.${tec}.${row}"; &response; } ############################################################################## # fetch values from 'ipfInTable' and 'ipfOutTable' tables sub fetch_hits_n_rules { local($row, $col, $ipf_output) = @_; local($asdf, $i, @ipf_lines, $length); # create an entry if no rule exists $ipf_output = "0 empty list for ipfilter" if !$ipf_output; @ipf_lines = split("\n", $ipf_output); $length = $#ipf_lines + 1; for($i = 1; $i < $length + 1; $i++) { $hits{$i} = $ipf_lines[$i-1]; $hits{$i} =~ s/^(\d+).*$/$1/; $rule{$i} = $ipf_lines[$i-1]; $rule{$i} =~ s/^\d+ //; if($i == $row) { return $i if $col == 1; return $rule{$i} if $col == 2; return $hits{$i} if $col == 3; } } # return undefined value undef $asdf; return $asdf; } # fetch values from 'ipfAccInTable' and 'ipfAccOutTable' tables sub fetch_hits_bytes_n_rules { local($row, $col, $ipf_output) = @_; local($asdf, $i, @ipf_lines, $length); # create an entry if no rule exists $ipf_output = "0 0 empty list for ipacct" if !$ipf_output; @ipf_lines = split("\n", $ipf_output); $length = $#ipf_lines + 1; for($i = 1; $i < $length + 1; $i++) { $hits{$i} = $ipf_lines[$i-1]; $hits{$i} =~ s/^(\d+) .*$/$1/; $bytes{$i} = $ipf_lines[$i-1]; $bytes{$i} =~ s/^\d+ (\d+) .*/$1/; $rule{$i} = $ipf_lines[$i-1]; $rule{$i} =~ s/^\d+ \d+ //; if($i == $row) { return $i if $col == 1; return $rule{$i} if $col == 2; return $hits{$i} if $col == 3; return $bytes{$i} if $col == 4; } } # return undefined value undef $asdf; return $asdf; } # get the values from ipfilter's tables sub get_value { local($table, $entry, $col, $row) = @_; if($table == 1) { # fetch ipfInTable data $ipf_output = `$ipf_in`; $value = &fetch_hits_n_rules($row, $col, $ipf_output); } elsif($table == 2) { # fetch ipfOutTable data $ipf_output = `$ipf_out`; $value = &fetch_hits_n_rules($row, $col, $ipf_output); } elsif($table == 3) { # fetch ipfAccInTable data $ipf_output = `$ipf_acc_in`; $value = &fetch_hits_bytes_n_rules($row, $col, $ipf_output); } elsif($table == 4) { # fetch ipfAccOutTable data $ipf_output = `$ipf_acc_out`; $value = &fetch_hits_bytes_n_rules($row, $col, $ipf_output); } return $value; } # generate response to 'get' or 'get-next' request sub response { # print ObjectID, its type and the value if(defined $ObjectID and defined $type{$tec} and defined $value) { print "$ObjectID\n"; print "$type{$tec}\n"; print "$value\n"; } exit; } PK{0]pUUNEWSnu[This file contains a summary of the major changes in released revisions. Please see the CHANGES file for a more detailed list of specific bugs/patches that have been fixed/applied, and the ChangeLog file for a comprehensive listing of all changes made to the code. *5.8* snmplib: - TLS/DTLS fixes - fix usm keychanges for new algorithms and longer keylengths - IP address formatting fixes - BUG: 2592: from Stuart Kendrick - increase MAXTC to 16384 - add new sha2 auth protocols - Restore AES-192 and AES-256 privacy protocols - from draft-blumenthal-aes-usm-04 (precursor to RFC 3826) - Use OIDs from http://www.snmp.com/eso/esoConsortiumMIB.txt - Some code borrowed from PATCH 1346, thanks to Alexander Ivanov and Vladimir Sukhorukov. - BUG: 2622: Fix excessive indents in log file - new config tokens: - sendMessageMaxSize - disableSNMPv1 / disableSNMPv2c - new api for dynamic debug log level (netsnmp_set_debug_log_level) snmpd: - SNMP-TARGET-MIB: Fix snmpTargetAddrTAddress - Com2sec and com2sec6 SOURCE values may deny sources as well as permit. - allow trap sinks to set Target-MIB characteristics (name, tag, profile) - add source addr/port option to trapsink/trap2sink/informsink - packet filtering by source ip (enableSourceFiltering/filtersource) - several getbulk handling improvements - several new APIs introduced for run-time configuration of agent: - netsnmp_vacm_simple_usm_add/del - usm_create_usmUser_* - netsnmp_udp_com2SecEntry_create/netsnmp_udp_com2SecList_remove - netsnmp_agent_listen_on to open agent port Win32: - Add support for the DTLS-UDP and TLS-TCP transports scripts: - A new 'checkbandwidth' script to check host min/max bandwidth snmptranslate: - Introduce bulk translation mode The special argument "-" causes snmptranslate to enter bulk translation mode, in which it expects one OID per line. Whitespace is treated as the end of the OID, and only that portion of the line is replaced, meaning that this can be used to translate, e.g., "snmpwalk" output without the proper MIBs loaded: snmptranslate -m all -OX < numeric.txt > symbolic.txt building: - Add Travis and Appveyor CI support - IPv6 support is now compiled by default. If you need an IPv4-only agent, use --disable-ipv6. - Fixed/improved support for several non-Linux platforms - Many fixes found by Coverity anf Fortify scans *5.7.3* Many many bug fixes and minor improvements snmpd, snmptrapd and apps: - Patch 2525: from Ryan Steinmetz: Fix argument length parsing of the host resources mib - Make ENV_SEPARATOR_CHAR configurable - SECURITY: a denial of service attack vector was discovered on the linux implementation of the ICMP-MIB. This release fixes this bug and all users are encouraged to update their SNMP agent if they make use of the ICMP-MIB table objects. perl: - BUG: 2402: Add support for SNMPv3 traps Windows: - Port batch build infrastructure to Visual Studio 2010 and later From Visual Studio 2010 on it is no longer possible to specify include or library directories globally - these have to be specified per project. Hence two additional menu entries in build.bat that allow to specify these directories. - Patch from Bart Van Assche to improve cygwin building *5.7.2* snmp: - BUG: 3526549: CVE-2012-2141 Array index error leading to crash snmpd: - BUG: 3532090: Fix high ifIndex values crashing hrDeviceDescr building: - PATCH: 2091156: correctly declare dependencies in Makefile. 'make -j ' should work now. Backport this to V5-4 as it is needed for correct operation in the single threaded case of make miblib as well. Many other miscellaneous minor bug fixes *5.7.1* libnetsnmp: - Fixed the mib-parsing-bug introduced shortly before 5.7 agent: - fixed rounding errors for disk percentage calculations openbsd: - better support for recent openbsd releases features: - bug fixes with minimalist support after additional user feedback Many other miscellaneous minor bug fixes *5.7* snmpd: - Delivery of data via regularily scheduled notifications. (see "Data Delivery via Notfications" in snmpd.conf) - Many time-based config options can take (m)ins, (h)ours, ... arguments (see the snmpd.conf manual page) - The PING and TRACEROUTE MIBs now compile and work-ish on linux http://www.net-snmp.org/wiki/index.php/DISMAN - Mib handlers can now implement a data_clone function for cloning the myvoid structure variable to avoid dangling pointers - Fixed persistent storage of VACM MIB configuration - Multi-homed agents send UDP responses from the proper IP address - The hrStorageTable implementation now supports large filesystems better - optimizations for large route tables - Added a deliveryByNotify config token for regular data delivery (see the snmpd.conf manual page and the NET-SNMP-PERIODIC-NOTIFY-MIB) - [PATCH 3141462]: fix agentx subagent issues with multiple-object requests - [PATCH 3057093]: linux uses libpci for creating useful ifDescr strings - [PATCH 3131397]: huge speedups of the TCP/UDP Tables libnetsnmp: - Removed the older CMU compatibility support - The SSH transport is now configurable TLS/DTLS support: - The SNMP over DTLS transport now properly supports IPv6 - Introduced new configuration tokens: localCert/peerCert (deprecating serverCert, clientCert, defX509ServerPub, defX509ClientPub) - Various fixes for the TLS/DTLS transports apps: - Added a per-variable timed output support to snmpwalk using -CT - snmpinform now correctly uses the local engineID for informs - A number of mib2c bug fixes - New snmp.conf tokens for timeouts and retries building: - New flags to reduce the amount of compiled code to bare minimums. This is provided by a new generic feature marking/selection mechanism. http://www.net-snmp.org/wiki/index.php/Feature_Marking_and_Selection - It's now possible to build without SNMPv3/USM (e.g., if you only want TLS/DTLS with SNMPv3/TSM) - It's possible to build the suite with no SET support configure using --enable-read-only - It's possible to build the agent as a notify-only agent configure using --enable-notify-only - Added a script to test memory usage with various config options (see the local/minimalist/sizetests script) - Net-SNMP can now be built to perform local DNSSEC validation (install DNSSEC-Tools' libval and use --with-local-dnssec-validation) testing: - a number of new API unit-tests have been added to the suite (to run the tests: cd testing && ./RUNFULLTESTS -g unit-tests) - The unit tests can be more easily run under valgrind (See http://bit.ly/jsgRnv for details) openbsd: - Support for updating the routing table via SNMP win32: - The testing suite works better under win32 environments - Many building fixes for the win32 environment(s) solaris: - Net-SNMP now supports the SCTP-MIB DragonFlyBSD, FreeBSD8: - Net-SNMP should now work on DragonFlyBSD and FreeBSD8 And of course: - Many other bug fixes. See the CHANGES and ChangeLog for details. *5.6* all: - Implemented the SNMP over TLS and SNMP over DTLS protocols [RFC-to-be] See http://www.net-snmp.org/wiki/index.php/TUT:Using_TLS - Implemented the "Transport Security Model" [RFC5591] - Generic host-specific configuration .conf files are now read. See the HOST-SPECIFIC FILES section of the snmp.conf manual page and http://www.net-snmp.org/wiki/index.php/Configuration - Include statements can now be used in .conf files. See http://www.net-snmp.org/wiki/index.php/Configuration snmpd: - Fix handling of multiple matching VACM entries. (Use the "best" match, rather than the first one). Reported by Adam Lewis. Note that this could potentially affect the behaviour of existing access control configurations. - Agent will no longer call table handlers if a set request for the handler has invalid indexes - table_data/tdata next handler will not be called during get processing if no valid rows are found for the handler - [PATCH 2952708]: Added Perl implementation of BRIDGE-MIB - moved all functions defined in libnetsnmphelpers to libnetsnmpagent. libnetsnmphelpers is now an empty library. - Implemented the TSM-MIB and the TLSTM-MIB - new API for indicating that persistent store needs to be saved after the current request finishes processing - [PATCH 2931446]: make the load averages writable. apps: - A new tool 'net-snmp-cert' that easily creates and manages X.509 certificates for use with the SNMP over (D)TLS protocols. - Added an 'agentxtrap' command to send notifications via AgentX (See http://www.net-snmp.org/wiki/index.php/TUT:agentxtrap for details) - -T command line flag can be used to pass configuration directly to transports that can accept configuration tokens - A new 'snmptls' command for manipulating the agent's TLS configuration snmplib: - A more modular transport subsystem that allows third party extensions and dependencies for code reuse. - New transport functions: f_config, f_open, f_copy and f_setup_session - Transports can now specify session defaults - E.G. dtlsudp: auto-sets the SNMP version and the security model. - [PATCH 2942940]: Add a new function, netsnmp_parse_args, that is like snmp_parse_args but takes an additional bitmask, flags, to affect the behaviour. Also remove the magic handling of some application names. - A new X.509 certificate API for indexing and reading certificates - new experimental row creation API which uses a state machine to try really hard to create a row from a given varbind list - netsnmp_container enhancements: - added a free_item function - added a CONTAINER_FREE_ALL macro/function - added an interface for duplicating a container (CONTAINER_DUP) - added a remove function to container_iterators - added an ability to set options on binary_array containers - new snmp token logOption allows specifying log destinations via configuration conf files - A very significant reduction in compiler warning output - new experimental simple state machine handling API building: - Support for a stream-line stripped down version of internal OpenSSL support using --with-openssl=internal. - Do not require that the UDP transport is included. - Building Net-SNMP with dmalloc support enabled is again possible. mib2c: - mib2c can now optionally run sed on generated code testing: - A brand new test infrastructure supporting multiple test suites See perldoc testing/RUNFULLTESTS for details python: - walking broken agents won't cause an infinite loop win32: - IPv6 is only supported under Cygwin 1.7 or later. - [BUG 2939168]: byte order of udpLocalPort is now correct. - [BUG 2939168]: fixed test infrastructure ("make test"). This has been fixed by using the proper environment separator character and by adding the path of the netstat executable for Cygwin in testing/TESTCONF.sh. - building with another OpenSSL package than the Cygwin-provided packages openssl and openssl-devel is again possible. - running the regression test suite is again possible ('make test'). - winExtDLL compiles now under MinGW. - the snmpd.conf keyword 'extend' is now supported under MinGW - the snmptrapd.conf keyword traphandle is now supported under MinGW qnx6: - [PATCH 2836895]: support for QNX6 *5.5* All applications: - Added the ability to "alias" transports to a more simple name (see the "alias" keyword in the snmp.conf manual page) - The -t (timeout) switch will accept floating point numbers (eg: .1) snmpd: - [BUG 1712988]: default/configurable max # varbinds returned by GETBULK - [PATCH 1585146]: Extend range of available error codes - [PATCH 1654424]: Handle row deletion issues in dataset tables - [PATCH 1666737]: Include IPv6 traffic in various UDP counters - [PATCH 1700157]: Fix ordering of exec tokens in MIB output - [PATCH 1719253]: fix skipNFSInHostResources for multiple walks - [PATCH 1723611]: New implementation of the RMON alarmTable - [PATCH 1737439]: automatic link up/down traps on a walk - [PATCH 1806501]: Add API for sending traps with a snmpv3 context - [PATCH 1882621]: Add LVM support to the partition table - [PATCH 1893468]: fixed registration of OIDs with ranges - [PATCH 1901764]: Support date-based logwatch files - [PATCH 1909813]: fix table_iterator handling of SORTED hint - [PATCH 1916840]: new config option to set SNMPv1 trap agent address - [PATCH 2103492]: implement RMON-MIB::etherStatsJabbers - [PATCH 2449210]: add 64-bit usage statistics to UCD-SNMP-MIB::dskTable - Add support for a user provided length variable and C string values to the watcher helper. - Automatically reregister sysORTable entries from AgentX subagents. - Fix various memory leaks - Implement ipAddressSpinLock - Implement ipNetToPhysicalLastUpdated - Suppress annoying "registration != duplicate" warning for root oids snmptrapd: - [PATCH 1908288]: Run perl END block on termination - Add trap handler for logging traps to a mysql database - Withdraw deprecated options. snmpnetstat: - [PATCH 2564538]: Support GETBULK in v2c+ snmp versions snmpusm: - [PATCH 1591355]: Allow cloning to arbitrary engineIDs snmplib: - [BUG 1619827]: Improve handling of link dependencies - [PATCH 700681]: limited support for UDPv4 broadcast addresses - [PATCH 1882069]: Add token for specifying an exact SNMPv3 engineID - Fix assorted memory leaks - Implemented RFC5343 contextEngineID probing. - Support for the TSM security model for use with tunneling misc: - Add config reread support to "net-snmp-config --compile-subagent" code - Preliminary (alpha) support for SNMP over SSH and DTLS/UDP. - Preliminary (alpha) support for the TSM security model - Separate user management into new net-snmp-create-v3-user script building: - Improved cross-compilation support - Improved library layering & dependency handling when linking apps - Improved RPM spec files, for consistency with vendor-provided packages. - Mechanism for selecting build environment based on version - New test scripts to test Net-SNMP transport functionality - Restructure configure template - Update to autoconf 2.63 & libtool 2.2.6 perl: - [BUG 1619827]: improve handling of link dependencies - [PATCH 1956193]: beta threadable perl module code for SNMPv1/2c usage. python: - [PATCH 1716114]: Let python build in source tree (Debian patch #38) Linux: - [PATCH 1704105]: Add IPv6 support to the inetNetToMediaTable - [PATCH 1705594]: Various fixes to ipAddressPrefixTable reporting - [PATCH 1708243]: Implement ipDefaultRouteTable - [PATCH 1715405]: Implement ipv6ScopeZoneIndexTable - [PATCH 1724602]: MfD-based ipDefaultRouterTable implementation - [PATCH 1828602]: Support ipDefaultTTL and ipForwarding SETs - [PATCH 1927751]: Implement icmpMsgStatsTable - [PATCH 2023633]: Implement SCTP-MIB - [PATCH 2053273]: Implement EtherLike MIB AIX: - Add support for AIX 6.x - Fix default shared library building instead of forcing static FreeBSD: - [BUG 1633483]: Support CPU HAL on FreeBSD4.x - [PATCH 1623874]: add GNU/kFreeBSD support IRIX: - [PATCH 1709748]: Optimized IRIX cpu stats - [PATCH 1675869]: CPU statistics for IRIX based on PCP MacOSX: - [PATCH 1600522]: CPU HAL implementation for mach/darwin Solaris: - [PATCH 1719730]: support for ipSystemStatsTable and ipAddressTable Win32: - [PATCH 2686248]: Fix several winExtDLL bugs. - [PATCH 1706344]: Fix compilation with cygwin - Fix AES support *5.4* Important Changes: - The default configuration now enables embedded Perl and the Perl modules by default when possible unless explicitly disabled. You may use the --disable-embedded-perl and --without-perl-modules configure options, respectively, to revert to the former default configuration. New: python: - Python bindings to the Net-SNMP project are now available in the python sub-directory. See the README file there for details. build: - Some preliminary support for automatic building of dynamically loadable mib module code. - Most net-snmp specific defines are now (also) available under a proper NETSNMP_ prefix. The older, potentially conflicting names as well as the autoconf variables can now be turned off easily within 3rd party code. - libtool update to 1.5.22 - enable-as-needed will try to link built libraries against needed libraries at library link time, rather than application link time. This is preliminary support for what will likely be better in 5.5. snmplib: - [PATCH 1282566]: to rework transport creation to allow for alternative interpretations of the address and a more flexible transport registration system - [PATCH 1509943]: responses will get sent from the original dest IP address when possible. snmpd: - new MIB table for managing Net-SNMP access control extensions (see NET-SNMP-VACM-MIB). These extensions to the VACM MIB are Net-SNMP specific and are used primarily by snmptrapd at this point. - [PATCH 1550725]: A new uint instance helper to match the existing int, long and ulong helpers - [PATCH 1534877]: to add support for skipping NFS entries in the host resources hrStorageTable. See the skipNFSInHostResources token in the snmpd.conf file for details. - A "hardware abstraction layer", to localise the O/S-specific aspects of retrieving system data. This first appeared in the 5.3.x line, but this release now starts to actively use it for implementing particular MIB modules. This has resulted in some minor changes in behaviour - some index values in the hrStorageTable have changed from earlier releases, and the (non-raw) memory statistics are now consistent, reporting percentage usage calculated over the last minute on _all_ systems. - Agent builds default module list from a default_mibs.h rather than a hard coded configure list - [PATCH 1568150]: Extend pass_persist error messages that can be passed back from the script - [PATCH 1570982]: Solaris IF-MIB: Support for IPv6-only interfaces snmptrapd: - the traphandle directive now supports a -t switch to indicate matching any OID in the tree below the specified OID mib2c: - New mib2c.emulation.conf provides a quick way to do simplistic emulation of an entire MIB or MIB branch. - A new perl module NetSNMP::agent::Support provides easier embedded perl support. (patch 1369996 from Peter Martin) Run "mib2c -c mib2c.perl.conf OID" to help you start using it. perl: - gettable() now supports asynchronous callback functions - update default_store module to latest default_store c-binding tokens snmpusm: - performance improvement when changing localized keys - new option -Cp to set usmUserPublic value snmpvacm: - new commands to manipulate Net-SNMP access control extensions Ports: Linux: - add IPv6 aware UDP and TCP mibs to default module list Solaris, FreeBSD, OpenBSD: - Experimental support for 64bit interface counters (ifXTable). Enable via '--with-mib-modules=if-mib --enable-mfd-rewrites'. - [PATCH 1569537,1569539]: new UDP-MIB and TCP-MIB implementation (enable through --with-mib-modules=udp-mib,tcp-mib) Win32: - new winExtDLL extension module to allow snmpd to load Windows SNMP Service extension DLLs to provide support for HOST-RESOURCES-MIB and other MIBs provided with Windows. AIX: - HOST-RESOURCES-MIB implementation added to default module list uCLinux - [PATCH 1551948]: Make pass_persist usable on uClinux Fixes: snmplib: - fix OID lookups for fully qualified object names (eg .iso.org) (official patch 1421725) - UDPIPv6 and TCPIPv6 transports now compile on recent UN*X platforms snmpd: - fix disman/event monitoring crashes (official patch 1429059) - fix re-init of daemons after SIGHUP (official patch 1473289) - fix trap processing from SMUX peers (patch 1430824) - [BUG 1527930]: fix smux authentication - [BUG 1427410]: Set auth engineID for SNMPv3 traps. - [BUG 1535903]: Support spaces within security names - fix 8 byte IpAddress in at, ip and route MIBs. - [PATCH 1562688]: fix ping/reattach agentx code snmptrapd: - fix bug 1420758/1458815: snmptrapd aborts/loops in select() (official patch 1420758) - fix re-init of daemons after SIGHUP (official patch 1473289) perl: - Fixed the perl bulkwalk function - gettable() was fairly broken in prior versions - OID handling was fully broken on various 64bit platforms - fixes for 64-bit platforms misc: - Many misc fixes *5.3.0.1* *** Security Fix *** - In version 5.3 much of the authorization control was rewritten. There was a bug in the new code that resulted in granting write access to read-only users or communities which were configured using the "rocommunity" or "rouser" snmpd.conf tokens. 5.3.0.1 fixes this problem. Users are encouraged to immediately update their installations if they use either of these tokens. *5.3* *** Important Notes *** Several very significant changes have been made in Net-SNMP for this release that warrant special attention. - shared library version number no longer matches the release number. We now follow the versioning scheme recommended by libtool. For the 5.3 release this means that the libraries now have a SONAME ending with ".so.10", e.g. libnetsnmp.so.10. - snmpd has not been truncating log files at startup, as documented in the man pages, for a while now. This default behaviour has been restored. Please use the '-A' flag if you want to continue appending to your log files at startup. - snmptrapd will no longer accept all traps by default. It must be configured with authorized SNMPv1/v2c community strings and/or SNMPv3 users. Non-authorized traps/informs will be dropped. - Due to a copyright statement that didn't allow modifications, snmpnetstat has been completely rewritten. The new version now accepts the same command-line options as the other tools, which has introduced a number of incompatible changes. However, it does now finally support SNMPv3. New: Building: - new option to disable set support in the agent (--disable-set-support) snmpd: - implement notification logging - implement notification filtering - AgentX, host resources and disman/event mibs added to default module list - updated and new disman mib implementations snmptrapd: - allow a non-default AgentX socket - a brand new authorization scheme that is based on the VACM authorization scheme from snmpd. - Note: now drops unauthenticated notifications by default - registers the snmpEngine MIB group under the "snmptrapd" context snmplib: - new helper for ascii file based scalar integers (think Linux /proc/) - new utilities for dealing with files - new utilities for parsing text files - granular config/persistent file disablement (noPersistentLoad and noPersistentSave snmp.conf tokens) mib2c: - mib2c.mfd.conf now generates code for persistence row storage - many enhancements and bug fixes snmpusm: - allows to use old and/or new localized key instead of passphrase with option -Ck - new option -CE to specify usmUserEngineID (necessary to manage snmptrapd's usmUserTable) Ports: Linux: - new experimental tables - tcpConnectionTable, tcpListenerTable - ipAddressPrefixTable - udpEndpointTable - ipv4InterfaceTable, ipv6InterfaceTable - inetCidrRouteTable supports dynamic ipv4 route creation/deletion - added ipv6IpForwarding.0 and ipv6IpDefaultHopLimit.0 (read-write) Win32: - Cygwin compiler fixes - MSVC: agent (snmpd) support for pass and pass_persist - MinGW: agent (snmpd) support for pass - Fix for 'select: No such file or directory' in snmpdelta Fixes: - Persistent files in directory defined by snmp.conf persistentDir were not being loaded at startup - Perl getnext didn't honor explicit reference to MIB file - AgentX sub-agent connection delayed til after config files read - Build fixes for --disable-agent, --disable-snmpv1 and --disable-snmpv2c - Lots of bug fixes *5.2* New: For the security paranoid (like Wes): - Insecure versions of SNMP may be completely disabled at compile time. (configure using one or both of --disable-snmpv1 --disable-snmpv2c) - Less secure versions of SNMPv3 authentication and encryption algorithms may be completely disabled at compile time. (configure using one or both of --disable-des --disable-md5) (This requires you have OpenSSL to support SHA1 and AES instead) - Diffie-Helman key negotiation (perfect-forward-secrecy - RFC2786) has been implemented in both the agent and "snmpusm". - Better support for direct use of localized and master keys (randomly generated keys have more entropy than passwords). See the -3m -3M -3k and -3K options, and the defAuthLocalizedKey, defPrivLocalizedKey, defAuthMasterKey, defPrivMasterKey snmp.conf tokens) library: - send and receive buffer sizes for UDP/TCP are configurable - .conf file token registration can now search multiple files (separate file names to search by a :. IE, "snmpd:agentx") snmptrapd: - Embedded perl support for trap handlers (much faster than traphandles). (configure --with-embedded-perl ; see 'perldoc NetSNMP::TrapReceiver') - the snmptrapd usmUser table can be controlled through SNMP & AgentX (the snmptrapd registers MIBs under the "snmptrapd" SNMPv3 context) agent: - community strings can be mapped to individual SNMPv3 contexts (see the snmpd.conf manual on "com2sec"). - AgentX should work properly with SNMPv3 contexts now. - improved version of "exec" extension directive - "extend": supports multi-line output, configurable command input, SET handling, a valid relocatable MIB output structure, etc - more flexibility added to netsnmp_cache helper, including periodic refreshing of caches and cache pre-loading. - experimental implementation of DisMan Remote Operations MIB groups (remote nslookup, ping, traceroute and expressions via SNMP) - The proxy supports a new -Cc flag which passes the community name through to the other side rather than hard-coding it. - The config_require() and other modules can now be placed inside of CPP directievs (#if, /* ... */) as header files are now passed through CPP processing first. - new config_exclude() macro for excluding certain modules - new config_belongs_in() macro to specify if a chunk of code found by --with-mib-modules belongs in the agent library or the mib module library. - Uses a smaller function stack. commands: - snmpusm: A number of key-change improvements (EG, changing localized keys supported, diffie-helman support, ...) - New -Ln option to completely disable logging. mib2c: - a number of new or updated configuration templates: - mib2c.iterate.conf: the iterator-based table config now produces fuller template code than before. - mib2c.table_data.conf and mib2c.container.conf: two new "internal-row" style configs - mib2c.mfd.conf: "MIBs for Dummies" (or MFD) - intended to reduce the SNMP knowledge needed to develop MIB modules and add flexibility at the same time. Run "mib2c -S mfd_interactive_setup=1 -c mib2c.mfd.conf OID" and follow its guided instructions to help you tailor its results to meet your needs. - mib2c.genhtml.conf: Generates an easier-to-read HTML view of a MIB tree structure. (See http://www.Net-SNMP.org/mibs/ for example output.) - more node tags available for conf file writers - additional search directories may be set via MIB2C_DIRS env var. - mib2c-update: new utility to help update mib2c generated code when conf file changes. - a mib2c.conf manual page to describe how to write mib2c .conf files. - support for embedded perl code in mib2c.conf files documentation: - New README.agent-mibs: an attempt to start documenting what MIBs are implemented in the agent and on what architectures. perl: - An improved SNMP::gettable() method. Uses GETBULK if possible and better GETNEXT requests if not, decodes indexes from OIDs, requests multiple variables at once, ... ("perldoc SNMP" for details) - A NetSNMP::OID::get_indexes() function to extract index values from an OID. Ports: Linux: - new experimental tables/rewrites for Linux, including: ifTable, ifXTable, inetCidrRouteTable, ipCidrRouteTable, ipAddressTable, ipSystemStatsTable, ipNetToPhysicalTable. - Enable these talbles by specifying --enable-mfd-rewrites to configure. - Most of these tables have IPv6 support as well. - ifIndex no longer changes when interfaces are added/removed, and all tables/object will now use the same ifIndex for the same interface. Solaris: - new experimental support for ucd-snmp/lmSensors MIB module Win32: - Support for the MinGW compiler - Support for snmptrapd running as a service - A Win32 specific build and install script - Support for a .exe installer (we'll make binaries available using it) Fixes: - AgentX memory leak on sets - SNMPv3 not-in-time window after 248 days - Agent hang in HOST-RESOURCES MIB - double free on duplicate registration - OIDs with IP Addresses as indexes now print prettier -'Lazy' installation of headers (only install if newer) - allow whitespace in rocommunity/rwcommunity - many miscellaneous bug reports *5.1.2* New: - Minor improvements to snmpdelta (error reporting) - Minor improvements to snmpnetstat (IPv6 output) Fixes: - Misc 64bit processor fixes. - Misc perl build and install fixes. Ports: - Linux 2.6 improvements - Win32 support for TCP and UDP over IPv6 via Winsock version 2 - Win32 fixes in many places. - Win32 service support for snmptrapd - Win32 support for snmpconf *5.1.1* New: - test suite supports testing over other transports (tcp, udp6, unix, ...) (see the -P switch to the testing/RUNTESTS script) - Solaris supports the use of it's PKCS#11 library for supporting cryptographic functions (OpenSSL isn't required if PKCS#11 is available) (see configure's --with-pkcs flag) Fixes: - Improvements on 64 bit architectures. - A few minor memory leaks fixed. - An extremely large number of minor bug fixes. - Many perl module specific bug fixes. - snmpd will safely handle more signals. Ports: - Many many significant Windows improvements. - AgentX support is working again under windows. - SCM support is built into the agent to allow the agent to be started as a windows service. - MSDOS names are supported in path names. - A win32 build script in win32/build.pl - Support for the MinGW compiler - (see the README.win32 file for details on new ports) - Various helpful win32/*.bat files for installation, etc. - Some linux 2.6 support improvements *5.1* New: Building: - configure is now generated using autoconf 2.57. - The make system now supports "make uninstall" - configure & make supports a --with-install-prefix option - new configure options to disable building of the agent, apps, ... ./configure --help for a list of package sections that can be excluded. - new configure option to remove specific code pieces (mib reading, ...) ./configure --help for a list of code areas that can be excluded. snmpd: - linkUp and linkDown notifications can be enabled (see the linkUpDownNotifications snmpd.conf token documentation) - notifications (traps) can be generated for disman/monitor events. (see the snmpd.conf documentation on "monitor" and "notificatonEvent") - new snmpd.conf tokens: includeAllDisks - the UCD-DISKIO-MIB will now work on linux. - com2sec mappings for SNMP over unix sockets. - some speed improvements have been made that should increase the speed of the agent's processing time. - for mib code using the table iterator, an auto-caching mechanism which can greatly speed up access at the cost of caching. (see "stash_cache" in the injectHandler token docs in snmpd.conf(5)) - Some of the agent modules were completely rewritten (and should be faster and cleaner). - A number of new APIs and helper modules are available, but there is no major summary to easily list. - A number of new Net-SNMP specific MIBs now exist. snmptrapd: - snmptrapd now supports forwarding of notifications. (see the snmptrapd.conf manual for details) - snmptrapd's new -t switch can be used to disable syslog. (useful for a no-output snmptrapd with only traphandle support) apps: - snmptable sports 3 new options: fixed width, max-repeaters, left-justify. (see snmptable -h for details) - mib2c walks you through instructions to help you generate code "just for you". Including some new forms of output code, like notification code generation. Run mib2c SOMETHING for details. - mib2c has about a billion other improvements, including the ability to generate trap generation code templates. - snmpwalk supports a new -Ct option for timing how long a walk takes. - net-snmp-config supports a number of new options. - All applications support a consistent -L flag for turning on which forms of output logging should be used. perl: - the SNMP module supports a new get_table() call. Fixes: - More patches to properly demonize snmpd (close std*, double fork, ...). - Version numbers of all packages/perl-modules/etc are better synchronized. - more documentation, especially for APIs - all perl module version numbers are synchronized with the net-snmp package. - Many many misc bug fixes, as always. Ports: - diskio MIB support for Darwin. - ifSpeed under Linux should now be correct for most network cards. - more windows build fixes *5.0.9* SECURITY: - An existing user/community could get access to data in MIB objects that were explicitly excluded from their view. Fixes: - Perl build environment should better under Windows - Misc kerberos support fixes. - Improvements on various manual pages. - A annoying bug with SETs being passed to pass scripts was fixed. - The often talked about VACM optimization improvement was fixed again. - mib2c handles augmentation tables better now. - Various 64 bit issues have been addressed. *5.0.8* New: - No new features will be added to the 5.0.x line. Ports: - Update libtool to version 1.4.3, for the benefit of Darwin - diskio support for Darwin - Updates for OpenBSD 3. - Updates to solaris README Fixes: - find libwrap w/nsl on RedHat - fix for openssl 0.9.7 - Fix some AgentX memory leaks - use macro for inline function prototypes - Attempt to find unused port before running tests - Use SNMP_SLEEP environment variable when running tests - calculate a proper ifSpeed under linux when possible - better daemonization of snmpd - close and reopen snmptrapd log files on HUP - support for 16 bit reuqest ids - Recognize new 't' code in display hints - misc other fixes *5.0.7* New: - VACM (access control) optimizations which will greatly benefit people who wish to exclude large portions of the MIB tree from some people. Previously this was a large resource drain. - Add command line option to snmpd to set syslog facility - Reverse DISPLAY-HINT processing, i.e. it allows you to input data formatted like a DISPLAY-HINT prescribes - Support setting of sysDescr and sysObjectID via snmpd.conf configuration directives - New output option to force display of strings as hex - Persistent directory can be specified at runtime - Add support for Linux virtual interfaces in the ipAddressTable. - implemented the mteEventTable and the mteEventNotificationTable form the DISMAN-EVENT-MIB. Fixes: - AgentX no longer flagged as experimental - A few memory leak fixes for the table_iterator agent API. - Processed flag cleared before each pass of a set request - Remove snmpd pid file on exit - Restore default behaviour of building shared libraries - misc other fixes *5.0.6* Fixes: - prevent denial of service attack from authenticated users (really this time). - misc other fixes *5.0.5* New: - Support for OpenSSL 0.9.7 - Beginning of support for AES encryption. ( Currently only usable with Net-SNMP and OpenSNMP software. ) Ports: - win32 new project files win32sdk.dsw for those with the win32 platform sdk. - win32 builds should work properly again, minus callbacks and thus AgentX. Fixes: - Several AgentX (the subagent protocol) specific bugs have been fixed - prevent denial of service attack from authenticated users - many many misc fixes - The perl agent module plugin should now work. - Many other perl module related fixes. - net-snmp-config --ldflags properly supplies -L flags - misc make test fixes and improvements. *5.0.4* During the testing for release 5.0.4, a release candidate was uploaded to Sourceforge and marked as hidden. For various reasons, the release was delayed and further changes and fixes were made. However, the release candidate files still appeared on the public FTP server and our mirrors. To avoid the confusion that could occur to users who may have downloaded this release candidate, we are bumping the revision number to 5.0.5. If you downloaded net-snmp-5.0.4.tar.gz, please upgrade to net-snmp-5.0.5.tar.gz. *5.0.3* New: - the "dist" directory contains the beginnings of some init scripts and packaging utilities. Ports: - win32 builds should work properly again. Fixes: - the 5.0.2 package had a few broken packaging problems. Opps. - a few misc fixes. Perl: - the perl modules should work with older versions of perl again. *5.0.2* New: - mib2c support for the old-4.X style api and for scalars. - many improvements to the netsh shell environment. Fixes: - tcpwrappers support should work significantly better. - NFS file systems are better supported in the hrStorageTable - the memory reporting no longer accidentally reports -1 integers - a few memory leaks fixed in the table_iterator API - fixes for Sun's "make" - ds_ prefix name-space protection (-> netsnmp_ds_) (run configure with --enable-ucd-compatibility for old API) - v1/v2c access control fixes for ipv6 addresses - many many misc fixes Perl: - The perl modules have a number of fixes, and the build process was fixed (again). - all make test suites should pass for people now. (there are still some known minor limitations, but we removed the tests) *5.0.1* New: - A new flag: -OQ which does quick printing (-Oq), but with an '=' sign. - All output should now have type tags in front of them. (STRING: and INTEGER: were added) - the snmplib/mib.c file has been instrumented with doxygen comments. - two new mib2c configuration files for generating column and enum defines. - a agent coding example: agent/mibgroup/examples/notification.c Perl: - the SNMP perl module properly uses snmp.conf values as defaults. - --with-perl should work this time. - more embedded perl support, but it still isn't complete yet. (the NetSNMP::OID module has received many new features) Ports: - added vmstat and memory support for hpux11 - other misc improvements for hpux11 Fixes: - the agent should properly handle requests in the right order. (e.g., restrict the agent to processing only one SET at a time) - net-snmp-config --compile-subagent has been greatly improved. - the tools should report the right version number. - large /proc/stat files on linux shouldn't crash the agent. - the smux module should handle multiple registrations better. - various documentation clean ups. - 64 bit address clean ups. - misc other bug fixes. *5.0* New: - Much of the agent internals were completely rewritten and sports a new module API to make your life easier. See the agent/mibgroup/examples directory for example code that makes use of some of the new functionality. (Also see http://www.net-snmp.org/tutorial-5/agent/ which has some incomplete documentation) - The agent sports embedded perl, see the perl details further below. - The agent supports multiple SNMPv3 contexts and mib modules can now register themselves under different contexts. (see the -n option in the snmpcmd manual page for details on specifying context strings in requests) - The proxy code has been completely rewritten and now supports the use of SNMPv3 contexts to help select which proxied host you wish to talk to. See the snmpd.conf manual page. - All the tools take --configToken=value options now. (see -H output from any command for what configTokens it accepts) - All the tools can speak over many different transport layers now, including UDP/TCP (ipv4 and ipv6), AAL5pvc, and IPX. See ./configure --help for details on enabling them. Note: the -p and -T flags to all the applications have been removed. Use hostname strings like "tcp:localhost:9999" instead. See the snmpcmd manual page for details. - snmptrapd now acts as an agentx subagent and implements portions of the NOTIFICATION-LOG-MIB to allow captured traps and informs to be queried. - A "net-snmp-config" script will get installed which can report how the various tools were built (which libraries they were linked against, etc). It will also help you do other things as well, like setting up snmpv3. Run net-snmp-config --help for details. - kerberos authenticated and encrypted SNMPv3 is now possible. See ./configure --help for details on enabling the ksm security module. - The AgentX subagent protocol implementation has many new features and fixes. - mib2c was completely rewritten and has a much improved configuration file specification. - Much of the code is getting documented with "doxygen" style documentation. Run "make docs" if you have doxygen installed. - some RMON support is available. (See agent/mibgroup/Rmon/README for details.) - The source tree has been reorganized and all the exported header files are now in the include subdirectory. You can now point to the includes easily without having to run "make install" first. - the agent now requires a configuration file to access any information. - The entire code base has had indent run on it to effect a consistent coding style. See the CodingStyle file for details. Perl: - The SNMP perl module now calls init_snmp() like real net-snmp applications, which means it will read snmp.conf configuration files, etc. - new perl specific configure options --with-perl-modules & --enable-embedded-perl. See ./configure --help for details. - The beginnings of some new Perl modules (alpha level quality) are in the perl directory, including: - NetSNMP::agent which allows perl scripts to become net-snmp master or subagents - AnyData::SNMP is available that implements a perl DBI interface to map SQL commands to SNMP. Included is a "netsh" shell where SQL commands can be typed, aliases created, etc. See the perl/AnyData_SNMP/INSTALL file for details. - Beginning (alpha level quality) support for embedding perl subroutines directly within the net-snmp agent. UCD-SNMP NEWS: *4.2.6* Big fixes: - Fixes to the Tunnel mib. - Deprecated the non-raw objects in the system stats MIB portion. - Testing harness fixes. - Network file system improvements fro the hrStorageTable. - fixed snmptable. - fixed the memory table (again) locking to 2^31 in value. - Misc documentation fixes and clean-ups. - Many other misc fixes. *4.2.5* Bug fixes: - The perl module actually works. Sorry about that. - don't overwrite the PID of an already-running snmpd with the PID of an abortive snmpd. - a 64 bit architecture socket fix - smux authentication fixed for multiple connected sessions. - dynamic module support testing in the configure - memory values > 32bits are now reported as a maxed out 32bit number *4.2.4* New: - badCommunityNames and badCommunityUses Counters supported. - tcp_wrappers support for snmptrapd. Bug fixes: - A security issue involving the snmpnetstat command accepting illegal data from a faked snmp server. - RPM library support fixes. - shared libraries built by default. - many bug fixes for conformance of target, notification, and vacm tables - many other fixes. Ports: - HPUX 11 - Dynix/PTX 4.4 - The snmpd demon can properly run as a windows service *4.2.3* New: - sysLocation, sysContact, sysName and snmpEnableAuthenTraps are persistent after being set remotely. - New "ignoredisk" directive to ignore disks in the host resources mib. Bug Fixes: - The ifTable on Linux no longer reports duplicate interfaces. - perl scripts print better error messages if needed modules aren't available. - trap sinks aren't duplicated after a SIGHUP. - misc other fixes. Ports: - improved irix support. - more mibII support for windows. *4.2.2* Security Bug Fixes: - A few security bugs have been found and fixed. No known exploits have been released to date. However, users are encouraged to upgrade to the 4.2.2 release as soon as possible. Bug fixes: - many misc bug fixes. - misc documentation corrections. - updated libtool to 1.4. This fixes a couple of platforms (eg, NetBSD). Ports: - mibII support for win32 - It should compile and work on MacOS X (Darwin) - udpTable supported on solaris. - win32 borland compiler supported (see win32/config.h.borland) New: - tkmib supports SETs and saving of configuration data. - snmpwalk detects out of order OIDs being returned from an agent. - snmpset accepts the '=' sign for a datatype if the mib is available to extract the datatype from instead. *4.2.1* Administrative: - The http://www.net-snmp.org/ web site and domain name is now active. - Copyright statement for changes beyond 4.2 is now a true BSD license. (see the COPYING file for details) Major Bug fixes: - AgentX master agent no longer crashes when a subagent disconnects. - counter64 encoding fixed. - oids with large numbers embedded in them should work properly (again). - Fixed behavior of agent_check_and_process() and alarms. - mib2c handles more variable types. - traps/informs are sent properly from agentx subagents. - many many more bug fixes have gone into this release. New: - The snmpconf configuration file editor can create snmptrapd.conf files. - AgentX support is compiled in by default, but must be configured now. (Add "master on" to your snmpd.conf file to enable agentx support) *4.2* Administrative: - project services moved to http://www.net-snmp.org/project/ Features: - Packets sequences are now shorter when possible, reducing packet sizes. - A new configuration file creation tool: snmpconf. (try snmpconf -g basic_setup) - A new command to remotely list disk space: snmpdf. - the agent VACM tables are now writable. - a new snmpvacm tool can be used to change the running vacm configuration. - dynamicly loadable mib module support for the agent. (see snmpd.conf on the dlmod directive) - minimal proxy support for snmpd (see snmpd.conf on the proxy directive) - libtool is now used to compile the package (better shared-library support) - the agent now supports the SNMP-NOTIFICATION-MIB. (enabled by default). - the agent can set trapsink using snmpcmd command line style parameters (see the trapsess section of the snmpd.conf manual page) - index matching in oids has been improved (see the snmpcmd manual page on -Ox, -OE, and -Ob). - snmptrapd has new formatting directives. (see the snmptrapd manual page on format1 and format2). - the agent can listen to multiple ports. - the agent can be restricted to listening on only certain interfaces. - the agent can be told at run time which mib modules (not) to initialize. (see the -I option in the snmpd.conf manual page) - the agent can run as a particular user. - snmptable takes a -Ci argument to show table indices. - snmptable uses GETBULK requests when it can (unless -CB is specified). - The "make test" suite contains a lot of new tests. - cross-compiling support. - snmpset checks types and range values for legality. - Significant improvements to the AgentX support. (Code is still beta, but probably safe for use on non-critical systems). Perl: - bulkwalk functionality for the SNMP perl module. - entirely numeric OID support. - support for best guess mode for OIDs. - range and default value access added. - build can now be targeted against a non-standard net-snmp install path. Fixes: - v3 traps/informs handled properly now. - Many more misc bug fixes. - snmpv3 engineIDs not IP address specific. *4.1.2* Fixes: - Host resources fixes for FreeBSD and NetBSD - ucd-snmp memory/vmstat fixes for FreeBSD-3 - configure --enable-ipv6 fixes - AIX fix (use knlist) - fix init_master_agent calling exit - bad free in subagent.c - dont let a agentx subagent be a smux master - ucd-snmp/loadave fix for AIX - fix doing a set on a pass variable - snmptable fixes - snmpnetstat fixes for v2c exceptions - man page fixes Features: - Some UnixWare 5 configuration support - configure --enable-mini-agent --without-openssl - snmptrapd -n - snmp_log callbacks - noTokenWarnings and noRangeCheck in snmp.conf - using a counter type in snmpset/snmptrap *4.1.1* Fixes: - Better agent handling of unauthorized requests. - Better "make test" support. - Misc bug fixes. *4.1* New: - Many new command line flags have been added for input/output flexibility. (see the snmpcmd(1) manual page on the -O flag and -I flag) - The tools support regex matching of oids on the command line. (see the snmpcmd(1) manual page on the -Ib option) - A ucd-snmp usage tutorial has been placed on the main web page. (see http://www.net-snmp.org/tutorial/) - snmptable is much smarter and handles sparse tables better. - tkmib supports snmpv3. - New agent libraries to embed SNMP and AgentX agents into other programs. (see the snmp_agent_api(3) manual page and the tutorial) - SNMP over TCP is supported. (-T TCP on the command lines) - OpenSSL has replaced KMT for SHA authentication and DES encryption. (Get OpenSSL from http://www.openssl.org/). - Some easier-to-use access-control snmpd.conf directives for simple setups. (see the snmpd.conf(5) manual page) - Easier setup of SNMPv3 support for the agent. (see the README.snmpv3 file). - Command line argument parsing has been reworked for getopt() use. (currently backwards compatible; see the snmpcmd(1) manual page) - Table rows with embedded strings are dealt with for both input and output. (see the snmpcmd(1) manual on the -Ob flag) - Many more snmp.conf directives supported. (see the snmp.conf(5) manual page) - Many AgentX improvements. - All of our distributed mibs have been updated to be SMIv2 compliant. - Trap support in the agent has been cleaned up and an API created. Perl: - Joe Marzot's perl module is now included with the ucd-snmp source. (this should help people trying to synchronize the two packages) Fixes: - SMUX support has been reintegrated into the agent in a better way. - Many many others. *4.0.1* New: - defVersion in snmp.conf supported. Fixes: - An option was accidentally turned on by default that shouldn't have been. - misc minor fixes. *4.0* New: - SNMPv3 protocol support!!! (See the README.snmpv3, snmpusm(1), snmp.conf(5), snmpd.conf(5)) - historic v2party support removed. - complete re-write of the agent. - The extensible AgentX protocol is in alpha-test mode. (to use, compile with the mib-module "agentx" or "agentx/master" or "agentx/client"). - syslog support for the agent (and everything else for that matter). - Per-process/per-exec-script based fix scripts implemented. (see snmpd.conf(5) for details) - many more config file options supported. (run any command with -H and see appropriate .conf manual pages) - The start of a "make test" suite. - many other things we've forgotten. - code is ANSI C now, and requires a ANSI C compiler. API Changes: - A small change to the write functions in mib modules. (data passed in has already be BER-decoded and is a pointer to a variable of the correct type). - The config_load_mib mib-module .h file directive is now obsolete. Use REGISTER_MIB inside your init function instead. *3.6.2* Fixes: - An important multi-session bug fix, especially needed for the SNMP perl module. - Many minor bug fixes. *3.6.1* Fixes: - Minor last second fixes mostly. *3.6* New: - All of the services for ucd-snmp have moved from the sites in ece.ucdavis.edu to ucd-snmp.ucdavis.edu, including http, ftp, and the mailing lists. - The configure --help output has been greatly improved for better readability and has been broken into sections. - The agent's SMUX support has been greatly improved and should function with applications other than gated now. - The snmptrapd has been make extensible so you can call other programs and scripts when a trap has been received. (see snmptrapd.conf(5)) - More configuration files have been created and can be used to specify defaults and configuration information to the various applications. Run each command with -H to see what it understands. (see snmp_config(5), snmpd.conf(5), snmp.conf(5), snmptrapd.conf(5)) - The configuration file parser looks in ~/.snmp by default as well, allowing each user to have his/her own setup files for the various applications. - The mib parser supports a variety of options dictating how strictly it parses mib files. (see snmpcmd.1 on "-P") - Debugging output with the -D flag now accepts a list of debugging information types to print. (see snmpcmd.1 on "-D") - Minimal multi-thread support using a modified version of the session API. (see snmp_sess_api(3)) - persistent storage of information is possible from the agent's mib modules now. (see read_config(3)) - The target mib has been implemented as an optional module. - More documentation has been written. - The recommended mib module API has changed slightly, but is backwards compatible as well. See the AGENT.txt file for new documentation on how to write mib modules for the agent. Fixes: - many misc bug fixes, as always. Ports: - snmpnetstat has been ported to the win32 environment. *3.5.3* - Bug fixes, including row creation sets to mib modules should work again. *3.5.2* - very small last minute bug fixes for win32 and freebsd mostly. *3.5.1* Fixes: - Many bug fixes submitted by users and the ucd-snmp-coders. - v2party support in the agent has been fixed. - The UCD-SNMP-MIB is SMICng compliant and should work under HP OV better. - Most sections of the mibII tree are 64bit clean. Copyright: - Simplification. *3.5* New: - agent/mibgroup directory reorganized hierarchically. - this may break the agent compilation with some compilers. - floats, doubles, counter64s, int64s, uint64s support via opaque types. - new modules: misc/ipfwacc. - use of dynamicly loadable modules now possible, but not fully supported. - New application command line flags: -s, -S, -m MIBS, -M MIBDIRS. - new configure options: --with-cc=CC and --with-cflags=CFLAGS Fixes: - Solaris core dumps. - Fixes for NetBSD 1.3. - The apps work again on 64bit machines. - misc other bug fixes. Ports: - host resources module should work on more platforms: NetBSD, FreeBSD, SunOS (almost). *3.4* Important: - the UCD-SNMP specific mib structure changed. - many of the table oids have changed location and have been renamed. - the View Based Access Control module was implemented in the agent. Therefore, the "community" snmpd.conf parameter no longer exists. See the snmpd.conf file for how to control access via community names now. - The header file #defines have changed. You may have to compile third party applications with -DCMU_COMPATIBLE (like perl-SNMP <= V1.7). - The parser is more strict about unlinked OIDs and end-of-comment conditions. You may see problems in a few broken mibs that used to parse ok with the older parser. New: - dynamic library support: configure with --enable-shared. - the beginnings of a Perl/Tk/SNMP mib browser: tkmib - all applications support -R for random oid-name lookups. - default mib list changes when you add or remove agent mib-groups. - debugging in the agent can be turned on and off using snmpsets. - a new mib module displays a list of all loaded mib modules. - the internal structure of the agent's mib modules is now hierarchical. - the agent looks for .conf files in both the lib/ and share/ directories. - more improvements/options to snmptable. - new vmstat module to report vmstat related information under linux. - a perl based mib2c translator to convert mib sections to C code templates. Fixes: - The code was run through purify for memory leaks and a few were found. - snmptrap sends to the correct default port of 162 again. Ports: - irix 6.2 support improved. - openbsd. - the host resources mib compiles on Solaris. *3.3.1* New: - "make install" installs the library and header files. Fixes: - compilation on many architectures (sunos for example). - snmptrapd doesn't exit if v2party files don't exist. - host resources works a bit better (ie, it compiles) under solaris. *3.3* Path changes: - the default paths to the installed mibs and snmpd.conf file have changed to /usr/local/share/snmp (set differently using --datadir). - the default path of the snmpd and snmptrapd have changed to /usr/local/sbin (set differently using --sbindir). New: - basic SNMPV2c support. - Not fully tested (feedback please!), and not RFC compliant. - all apps require '-v 2c' for v2c and '-v 2p' for the older party code. - basic host-resources mib support for linux, and hpux. - All environment variables can be set with a preceding '+' for indicating additions to the default values. - mib modules cleaned up more and can be added and removed more easily. - mib modules have a new macro for callbacks when reading a .conf file. - apps command line interfaces have merged together for standardization. - the libsnmp library no longer forces printing of errors. - 2 new applications: snmpdelta and snmptable. - the mib parser caches mib directory scans for speed improvements. - snmptrapd is snmp-version multi-lingual. Ported: - irix should be more complete. - aix 4.1.5. - fixes for hpux 10.20. - linux 2.1.x support. - library and apps supported under 32bit windows systems. Fixes: - too numerous to mention. *3.2* New: - Top level of the mib parser has been restructured - no longer reads 'mib.txt' - no longer reads everything (MIBS/MIBDIRS) - reads import clauses to load other required modules - new man page: mib_api.3 - The agent has been completely restructured (modularized) to allow for easier extension via C code and requires no modification of the ucd-snmp distributed source code to add in new C coded mib modules. See the README file in the agent/mibgroup subdirectory for details. Modules are added and/or removed via configure options. - agent can send traps to multiple trap destinations. - configure can be run outside the default source directory. - Optional modules: SMUX support to talk with a running gated. - All configure prompted questions can be set on the command line instead. Fixes: - Memory leaks. - code is now prototyped and many related bugs have been found. (an ANSI compiler is still optional.) - Many others. Ported: - linux-2.* - mips-sgi-irix6.3 (agent needs 2 mib-modules removed still) *3.1.3* New: - FAQ file! - bug-report script! - Agent can read .conf files from more places: - SNMPCONFPATH environment variable. - command line options: -c FILE and -C. - Agent can send coldstart and authentication traps. - All requests/patches/questions should go to ucd-snmp-coders@ece.ucdavis.edu - snmp variables mib implemented. - more udp, ip, ipNetToMedia tables implemented. Fixes: - Memory leaks. - Many other system specific fixes. Misc: - configure script updated to autoconf 2.12. Removed: - Very ancient tk/tcl code. *3.1.2* New: - extensible mib moved to ucdavis enterprise mib: .1.3.6.1.4.1.2021. - PORTING file added. - new configure switch: --without-root-access. Ports: - BSDi, and possibly irix, and linux is not too far off. - massive improvements for netbsd, freebsd, hpux. Fixes: - Massive parser improvements. (Niels Baggesen ) - configure script upgraded to autoconf 2.11. *3.1.1* New: - init_mib() now reads all files in PREFIX/lib/snmp/mibs as mibs. - sysContact and sysLocation settable in snmpd.conf. - TC information retained (from Joe Marzot). Fixes: - snmpset on a pass script works now. - pass scripts more throughly tested and debugged. - community 5 can be set now. - Many others. *3.1.0.1* Ported: - FreeBSD 2.? Fixes: - snmptrap greatly improved! (Niels Baggesen ) - other small stuff. - default logfile location moved to /var/log if exists, else /usr/adm. New: - snmptrap man page. (Niels Baggesen ) *3.1* Features: - Pass thru extensibility added! - snmpnetstat greatly improved (Niels Baggesen ) - improved solaris info caching (Dan A. Dickey ) Bug fixes: - many fixes for solaris (Niels Baggesen and "Dan A. Dickey" ) - greatly reduced memory usage by mib parser (Niels Baggesen) - disk checks fixed for solaris and osf. - improved Mib parsing from Mike Perik - TRAP-TYPE/NOTIFICATION-TYPE now handled. - IMPORTS definition no longer required. - SIZE syntax fixed. - sedscript compiles correctly with Solaris's spro compiler. - many more small ones. Misc: - Upgraded to autoconf-2.10 *3.0.7.2* Major solaris patches from Niels Baggesen . Thanks! Other misc patches *3.0.7.1* Bug fixes. *3.0.7* Features: - Two new operating systems supported: hppa1.1-hp-hpux10.01, *-netbsd1.1 - Two new ./configure options: --enable-debugging: includes nlist and other warnings in log-file output. --with-defaults: Assumes you want the defaults for all user prompts. Bug fixes: - make clean in man/ works. - Fixed the mib.txt capitalization problem. - Fixed a gcc cpp problem (added -x c to the command line options). - Added NULL to the second gettimeofday argument. Misc: - Upgraded to autoconf-2.9 - snmpcheck upgraded to perl5.002 and Tk-b10 - totally re-did the routing tables (required by hpux10.01). *3.0.6* Features: - snmpV1 community names can be set in the configuration files now! - new app: apps/snmptrap, as requested by many, many people. - New man page (rough still): snmpd.conf.5. - Returns new values for system.sysObjectID for each supported OS. - Better OpenView support for changing the icons & etc. See ov/README. Bug fixes. - -p PORT -l LOGFILE now work as advertised. - printed values of timeticks are no longer negative. - Correctly finds the Solaris 2.5 kernel. - the restart-agent mib entry now sets an 1 second alarm to restart so it can return a proper snmp response first. - Truncates existing logfiles. - nlist warnings removed. - more... (see the ChangeLog) *3.0.5* Bug fixes: - 'make' should not call 'autoconf' and associates anymore. - Fixed sun4 exit codes. Really. - Changed config.h a bit to fix the mib.txt file's errors when some mibs were not defined for usage. Misc: - Updated configure to autoconf 2.7 *3.0.4* Mainly a bug fix release: - fixed another 32/64 bit problem: returned exit codes on alphas were incorrect. - many system errors (e.g., no mem) were causing the agent to return error flags when it really was clueless. - found a memory leak in the CMU routing table implementation. - More configure cleanups, mostly for Solaris. - snmp_open calls getservbyname only once now, at the request of Gary Hayward . Mainly for Perl users. New example file: EXAMPLE.conf file (created at build time). local/snmpcheck has drastically improved, and now requires Tk-b8. You can now mung with all sorts of numbers in config.h and the mib.txt file will be mostly built from it if you change my defaults. *3.0.3* *** default location for .conf and mib.txt files moved to .configure's --prefix location Now using GNU's auto-conf for better portability - prompts for important config.h information as well Port to Sun4/Solaris 2.4 -h/--help and -v/--version flags added to snmpd *3.0.2.1* Compilation bug fix *3.0.2* Port to dec-alpha/OSF 3.1 - quite a few more CMU bugs found during port. (docs/snmpd.1) Beginnings of documentation/man pages. (local/snmpcheck) Many changes/improvements. Still very (usable) Beta. (NEWS) Added this file! *3.0.1* (agent/snmpd) 2 Command line options added: -l LOGFILE Outputs stderr/out to LOGFILE (overrides config.h def) -L Do NOT write to a log file (overrides config.h) (agent/snmpd) New built in mib functions: MIB.VERSIONMIBNUM.VERUPDATECONFIG (default: .1.3.6.1.4.10.100.11) -- set to 'integer:1' to tell the agent to re-read the config file(s). MIB.VERSIONMIBNUM.VERRESTARTAGENT (default: .1.3.6.1.4.10.100.12) -- set to 'integer:1' to tell the agent to restart (exec and quits) Bug fixes/more CMU clean up *3.0* Initial (public) Release PK{0]PPREADME.agent-mibsnu[The following is a list of SNMP MIB tables and object, and their implementation status for Net-SNMP. Note that simply adding a MIB file does not allow the agent to return values for the MIB. See the FAQ question here for details: http://www.net-snmp.org/FAQ.html#How_do_I_add_a_MIB_to_the_agent_ This table was generated by inspecting the source, so it may be incorrect, especially with regards to OS platform support. If an object/table is listed for your OS but doesn't work (or vice-cersa), let us know. The Rel column indicates the first release that an object/table was available. That does not imply that all platforms indicated in the OS column were supported for that release. There is no breakdown of feature introduction by platform. Note that the earliest CVS information I could find was for sometime around ucd-snmp 3.2. The OS platform is probably the least reliable of the columns, as most are marked as 'unix?', indicating that most unix-based platforms should support the table. An '=' in a file path indicates that the table/object name should be substituted in place of the '=' in the path. All paths are relative to the agent/mibgroup directory. X.*.0 indicates all scalars under node X. X.?.0 indicates all scalars execept as noted. .Y.0 indicates that Y is an exception to the previous scalar group. Table Style ---------------------------- O old (ucd) style helper D table data helper I table iterator A iterate_access S scalar helper G scalar group helper W watched scalar M mfd C container table Platform Keys ------------------ A All systems U unix based L Linux S Solaris H HP-UX B BSD Based F FreeBSD O OpenBSD N NetBSD X MacOSX W Win32 based $ Microsoft C cygwi--- M MingW A number after a platform indicates notes at the bottom of the file. table/object group OS Rel Styl File ============================================================================== SNMPv2-MIB system.?.0 A 5.5 W mibII/system_mib.c .sysORLastChange.0 A 5.5 W mibII/sysORTable.c sysORTable A 5.5 C mibII/sysORTable.c snmp.*.0 A 5.5 G mibII/snmp_mib.c setSerialNo.0 A 5.0 W mibII/setSerialNo.c ------------------------------------------------------------------------------ SNMP-FRAMEWORK-MIB snmpEngine.*.0 A ~4.0? O snmpv3/snmpEngine.c ------------------------------------------------------------------------------ SNMP-MPD-MIB snmpMPDStats.*.0 A ~4.0? G snmpv3/snmpMPDStats.c ------------------------------------------------------------------------------ SNMP-TARGET-MIB snmpTargetSpinLock.0 A 3.6 O target/snmpTargetAddrEntry.c snmpTargetAddrTable A 3.6 O target/snmpTargetAddrEntry.c snmpTargetParamsTable A 3.6 O target/snmpTargetParamsEntry.c snmpUnavailableContexts.0 A 5.5 G target/target_counters.c snmpUnknownContexts.0 A 5.5 G target/target_counters.c ------------------------------------------------------------------------------ SNMP-NOTIFICATION-MIB snmpNotifyTable A 4.2 O notification/= snmpNotifyFilterProfileTable A 4.2 O notification/= snmpNotifyFilterTable A 4.2 O notification/= nlmConfig.*.0 --- nlmStats.*.0 --- ------------------------------------------------------------------------------ NOTIFICATION-LOG-MIB * --- ------------------------------------------------------------------------------ SNMP-PROXY-MIB snmpProxyTable --- ------------------------------------------------------------------------------ SNMP-USER-BASED-SM-MIB usmStats.*.0 A ~4.0 O --- deleted --- usmStats.*.0 A 5.5 G snmpv3/usmStats.c usmUserTable A ~4.0? O snmpv3/usmUser.c ------------------------------------------------------------------------------ SNMP-VIEW-BASED-ACM-MIB vacmContextTable A ~3.5 I mibII/vacm_context.c vacmSecurityToGroupTable A ~3.5 O vacmAccessContextTable A ~3.5 O mibII/vacm_vars.c vacmViewSpinLock.0 A ~3.5 O vacmViewTreeFamilyTable A ~3.5 O ------------------------------------------------------------------------------ SNMP-USM-DH-OBJECTS-MIB usmDHPublicObjects.*.0 A 5.2 S snmp-usm-dh-objects-mib/=/* usmDHUserKeyTable A 5.2 M snmp-usm-dh-objects-mib/=/* usmDHKickstartTable --- ------------------------------------------------------------------------------ SNMP-COMMUNITY-MIB snmpCommunityMIBObjects.*.0 --- snmpCommunityTable --- snmpTargetAddrExtTable --- ------------------------------------------------------------------------------ IF-MIB ifNumber.0 U $2 ~3.2 O mibII/interfaces.c ifTableLastChange.0 --- ifTable (old) U $2 ~3.5 O mibII/interfaces.c ifTable (new) L 5.2 M if-mib/ifTable/* ifTable (new) FOS 5.4 M if-mib/ifTable/* ifXTable L 5.2 M if-mib/ifXTable/* ifXTable FOS 5.4 M if-mib/ifXTable/* ifStackLastChange.0 --- ifStackTable --- ifTestTable --- ifRcvAddressTable --- ------------------------------------------------------------------------------ RFC1213-MIB atTable (D) U $2 ~3.5 O mibII/at.c egp.*.0 --- egpNeighTable --- ------------------------------------------------------------------------------ IP-MIB ip.*.0 U $2 ~3.2 G mibII/ip.c icmp.*.0 U $2 ~3.2 G mibII/icmp.c ipSystemStatsTable L 5.2 M ip-mib/=/* ipSystemStatsTable S 5.5 M ip-mib/=/* ipIfStatsTableLastChange.0 --- ipIfStatsTable L-- 5.5 M ip-mib/=/* ipAddrTable (D) U $2 4.2 O mibII/ipAddr.c ipAddressSpinLock.0 A 5.5 O mibII/ipAddr.c ipAddressTable L 5.2 M ip-mib/=/* ipAddressTable S 5.5 M ip-mib/=/* ipAddressPrefixTable L 5.3 M ip-mib/=/* ipRouteTable (D) U $2 ~3.5 O mibII/*route*.c ipNetToMediaTable (D) U $2 ~3.5 O mibII/at.c ipNetToPhysicalTable (implemented as inetNetToMediaTable) inetNetToMediaTable L 5.2 M ip-mib/=/* ipDefaultRouterTable L 5.5 M ip-mib/=/* icmpStatsTable --- icmpMsgStatsTable --- ipv4InterfaceTableLastChange --- ipv4InterfaceTable L 5.3 M ip-mib/=/* ipv6InterfaceTableLastChange --- ipv6InterfaceTable L 5.3 M ip-mib/=/* ipv6RouterAdvertTable --- ipv6IpForwarding.0 L 5.3 S ip-mib/ip_scalars.c ipv6IpDefaultHopLimit.0 L 5.3 S ip-mib/ip_scalars.c ipv6RouterAdvertSpinLock.0 --- ipv6ScopeZoneIndexTable --- ipForwarding.0 L 5.4 S ip-mib/ip_scalars.c ipDefaultTTL.0 L 5.4 S ip-mib/ip_scalars.c ------------------------------------------------------------------------------ IPV6-MIB ipv6MIBObjects.?.0 U 4.1 O mibII/ipv6.c .ipv6IfTableLastChange.0 --- .ipv6RouteNumber.0 --- .ipv6DiscardedRoutes.0 --- ipv6Interfaces U1 4.1 O mibII/ipv6.c ipv6IfTable U1 4.1 O mibII/ipv6.c ipv6IfStatsTable U1 4.1 O mibII/ipv6.c ipv6AddrPrefixTable --- ipv6AddrTable --- ipv6RouteTable --- ipv6NetToMediaTable --- ------------------------------------------------------------------------------ IPV6-TCP-MIB ipv6TcpConnTable U1 4.1 O mibII/ipv6.c ------------------------------------------------------------------------------ IPV6-UDP-MIB ipv6UdpTable U1 4.1 O mibII/ipv6.c ------------------------------------------------------------------------------ IPV6-ICMP-MIB ipv6IfIcmpTable U1 4.1 O mibII/ipv6.c ------------------------------------------------------------------------------ IP-FORWARD-MIB ipForward.*.0 --- ipForwardTable (D) --- ipCidrRouteTable (D)(new) L 5.2 A mibII/= ipCidrRouteTable (D)(newer) L 5.2 M ip-forward-mib/=/* inetCidrRouteTable L 5.2 M ip-forward-mib/=/* ------------------------------------------------------------------------------ TCP-MIB tcp.*.0 U $2 ~3.2 G mibII/tcp.c tcpConnTable (D) U $2 4.2 I mibII/tcpTable.c tcpConnectionTable L 5.3 M tcp-mib/=/* tcpConnectionTable S 5.4 M tcp-mib/=/* tcpListenerTable L 5.3 M tcp-mib/=/* tcpListenerTable S 5.4 M tcp-mib/=/* ------------------------------------------------------------------------------ UDP-MIB udpEndpointTable L 5.3 M udp-mib/=/* udpEndpointTable S 5.4 M udp-mib/=/* udp.*.0 U $2 ~3.2 G mibII/udp.c udpTable (D) U $2 4.2 I mibII/udpTable.c ------------------------------------------------------------------------------ IF-INVERTED-STACK-MIB * --- ------------------------------------------------------------------------------ RMON-MIB etherStatsTable U 5.0 O Rmon/statistics.c .etherStatsJabbers L3 5.5 M rmon-mib/=/* etherHistoryControlTable U 5.0 O Rmon/history.c etherHistoryTable U 5.0 O Rmon/history.c alarmTable U 3.2 O Rmon/alarm.c eventTable U 3.2 O Rmon/event.c logTable U 5.0 O Rmon/event.c hostControlTable --- hostTable --- hostTimeTable --- hostTopNControlTable --- hostTopNTable --- matrixControlTable --- matrixSDTable --- matrixDSTable --- filterTable --- channelTable --- bufferControlTable --- captureBufferTable --- ------------------------------------------------------------------------------ HOST-RESOURCES-MIB hrSystem.*.0 U ~3.3 O host/hr_system.c hrMemorySize U ~3.3 O host/hr_storage.c hrStorageTable U ~3.3 O host/hr_storage.c hrDeviceTable U ~3.3 O host/hr_device.c hrProcessorTable U ~3.3 O host/hr_proc.c hrNetworkTable U ~3.3 O host/hr_network.c hrPrinterTable U ~3.3 O host/hr_print.c hrDiskStorageTable U ~3.3 O host/hr_disk.c hrPartitionTable U ~3.3 O host/hr_partition.c hrFSTable U ~3.3 O host/hr_filesys.c hrSWOSIndex.0 --- ~3.3 O host/hr_swrun.c hrSWRunTable U ~3.3 O host/hr_swrun.c hrSWRunPerfTable U ~3.3 O host/hr_swrun.c hrSWInstalled.*.0 U ~3.3 O host/hr_swinst.c hrSWInstalledTable U ~3.3 O host/hr_swinst.c ------------------------------------------------------------------------------ DISMAN-EVENT-MIB mteTriggerTable A 5.0 O disman/= mteTriggerFailures.0 --- mteTriggerDeltaTable A 5.0 O disman/= mteTriggerExistenceTable A 5.0 O disman/= mteTriggerBooleanTable A 5.0 O disman/= mteTriggerThresholdTable A 5.0 O disman/= mteObjectsTable A 5.0 O disman/= mteEventTable A 5.0.7 D disman/= mteEventFailures.0 --- mteEventNotificationTable A 5.0.7 D disman/= mteResource.*.0 --- mteEventSetTabel --- ------------------------------------------------------------------------------ DISMAN-SCHEDULE-MIB schedLocalTime.0 A 5.3 D disman/schedule/= schedTable A 5.3 D disman/schedule/= ------------------------------------------------------------------------------ DISMAN-EXPRESSION-MIB (expired ID) expErrorTable U 5.2 O disman/expression/= expExpressionTable U 5.2 O disman/expression/= expObjectTable U 5.2 O disman/expression/= expValueTable U 5.2 O disman/expression/= ------------------------------------------------------------------------------ DISMAN-PING-MIB (draft-ietf-disman-remops-mib-v2*) pingCtlTable U 5.2 O disman/ping/= pingProbeHistoryTable U 5.2 O disman/ping/= pingResultsTable U 5.2 O disman/ping/= ------------------------------------------------------------------------------ DISMAN-TRACEROUTE-MIB (draft-ietf-disman-remops-mib-v2*) traceRouteCtlTable U 5.2 O disman/traceroute/= traceRouteHopsTable U 5.2 O disman/traceroute/= traceRouteProbeHistory U 5.2 O disman/traceroute/= traceRouteResultsTable U 5.2 O disman/traceroute/= ------------------------------------------------------------------------------ DISMAN-NSLOOKUP-MIB (draft-ietf-disman-remops-mib-v2*) lookupCtlTable U 5.2 O disman/nslookup/= lookupResultsTable U 5.2 O disman/nslookup/= ------------------------------------------------------------------------------ DISMAN-SCRIPT-MIB * --- ------------------------------------------------------------------------------ EtherLike-MIB dot3StatsTable L 5.5 M etherlike-mib/= ------------------------------------------------------------------------------ AGENTX-MIB * --- ------------------------------------------------------------------------------ LM-SENSORS-MIB lmTempSensorsTable LS 5.0 O ucd-snmp/lmSensors.c lmFanSensorsTable LS 5.0 O ucd-snmp/lmSensors.c lmVoltSensorsTable LS 5.0 O ucd-snmp/lmSensors.c lmMiscSensorsTable LS 5.0 O ucd-snmp/lmSensors.c ------------------------------------------------------------------------------ UCD-SNMP-MIB prTable U $ ~3.2 O ucd-snmp/proc.c memory.*.0 U ~3.2 O ucd-snmp/memory*.c extTable U $ ~3.2 D ucd-snmp/extensible.c dskTable U 3.2 O ucd-snmp/disk.c fileTable A 3.6 O ucd-snmp/file.c laTable U $ ~3.2 O ucd-snmp/loadave.c systemStats.*.0 U 3.4 O ucd-snmp/vmstat*.c ipFwAccTable U 3.5 O misc/ipfwacc.c dlModTable U 4.2 O ucd-snmp/dlmod.c diskIOTable U 4.1 O ucd-snmp/diskio.c ucdDemoMIBObjects A ~3.5 O examples/ucdDemoPublic.c logMatch U ~3.5 O ucd-snmp/logmatch.c version.*.0 A ~3.2 O ucd-snmp/versioninfo.c snmperrs.*.0 A ~3.5 O ucd-snmp/errormib.c mrTable (D) --- ------------------------------------------------------------------------------ NET-SNMP-EXTEND-MIB nsExtendConfigTable U ~3.5 D agent/extend.c nsExtendOutput1Table U ~3.5 D agent/extend.c nsExtentOutput2Table U ~3.5 D agent/extend.c ------------------------------------------------------------------------------ NET-SNMP-AGENT-MIB nsModuleTable A 5.0 I agent/nsModuleTable.c nsCacheTable A 5.0 I agent/nsCache.c nsConfigDebug.*.0 A 5.0 I agent/nsDebug.c nsDebugTokenTable A 5.0 O nsConfigLogging A 5.0 I agent/nsLogging.c nsLoggingTable A 5.0 O nsTransactionTable A 5.0 I agent/nsTransactionTable.c netSnmpExampleScalars A 5.0 O netSnmpIETFWGTable A 5.0 D examples/data_set.c netSnmpHostsTable A 5.0 A examples/=* nstAgentModules A 5.0 O ------------------------------------------------------------------------------ NET-SNMP-VACM-MIB nsVacmAccessTable A 5.4 I agent/nsVacmAccessTable.c ------------------------------------------------------------------------------ MTA-MIB mtaTable U 4.2 O mibII/mta_sendmail.c mtaGroupTable U 4.2 O mibII/mta_sendmail.c ------------------------------------------------------------------------------ SMUX-MIB smuxPeerTable --- smuxTreeTable --- ------------------------------------------------------------------------------ BGP4-MIB (draft-ietf-idr-bgp4-mib) bgpPeerTable A 3.5 O smux/snmp_bgp.c ------------------------------------------------------------------------------ OSPF-MIB (draft-ietf-ospf-mib-update) * A 3.5 O smux/snmp_ospf.c ------------------------------------------------------------------------------ RIPv2-MIB * A 3.5 O smux/snmp_rip2.c ------------------------------------------------------------------------------ TUNNEL-MIB tunnelIfTable L 4.2 O tunnel/tunnel.c tunnelConfigTable L 4.2 O tunnel/tunnel.c tunnelInetConfigTable --- ------------------------------------------------------------------------------ SCTP-MIB sctpStats L 5.5 S sctp-mib/sctpScalars* sctpParameters L 5.5 S sctp-mib/sctpScalars* sctpAssocTable L 5.5 C sctp-mib/= sctpAssocLocalAddrTable L 5.5 C sctp-mib/= sctpAssocRemAddrTable L 5.5 C sctp-mib/= sctpLookupLocalPortTable L 5.5 C sctp-mib/= sctpLookupRemPortTable L 5.5 C sctp-mib/= sctpLookupRemHostNameTable L 5.5 C sctp-mib/= sctpLookupRemPrimIPAddrTable L 5.5 C sctp-mib/= sctpLookupRemIPAddrTable L 5.5 C sctp-mib/= ------------------------------------------------------------------------------ SNMP-TSM-MIB snmpTsmStats A 5.6 D tsm-mib/snmpTsmStats/= snmpConfiguration A 5.6 W tsm-mib/= ------------------------------------------------------------------------------ TLSTM-MIB snmpTlstmSession A 5.6 W tlstm-mib/=/* tlstmCertificateMapping.* A 5.6 w tlstm-mib/= tlstmCertToTSNTable A 5.6 D tlstm-mib/=/* tlstmParamsTable A 5.6 D tlstm-mib/=/* tlstmAddrTable A 5.6 D tlstm-mib/=/* ============================================================================== Misc notes ---------- 1: available for systems using KAME ipv6 2: with platform SDK. See README.win32 3: works only with Intel and Broadcom network cards and must run as root only Other feature info ------------------ smux 3.2 AgentX 4.0 proxy support 4.2 override token 5.0 proper context support 5.2 DISMAN-EVENT-MIB implementation rewrite 5.3 AgentX, host, disman/event by default 5.3 SSH Transport module 5.5 (D)TLS Transport module 5.6 PK{0]lHq AGENT.txtnu[Note, this is based on the text from a web page, which can be found in the documentation section of the http://www.net-snmp.org web page. Extending the UCD-SNMP agent ============================ This document describes the procedure for writing code to extend the functionality of the v4 UCD-SNMP network management agent. Modules written using this procedure should also work with the v5 Net-SNMP agent, though such modules would not take advantage of the new handler-based helper mechanism. See the on-line documentation for more information and examples of the newer approach. We would be very interested in comment and feedback about how useful (or otherwise) you find this description, and ways in which it could be improved. The information is designed to be read in order - the structure being: 1. Overview & Introduction 2. MIB files, and how they relate to the agent implementation 3. Header files 4. The basic structure of module implementation code 5. The details of non-table based implementations 6. The details of simple table based implementations 7. The details of more general table based implementations 8. How to implement SET-able variables While the document is intended to be generally self-contained, it does occasionally refer to code files shipped with the main UCD distribution (in particular the example module), and it may prove useful to have these files available for reference. 1. How to write a Mib module ============================ Introduction ------------ The design of the UCD SNMP agent has always been shaped by the desire to be able to extend its functionality by adding new modules. One of the earliest developments from the underlying CMU code base was the ability to call external scripts, and this is probably the simplest method of extending the agent. However, there are circumstances where such an approach is felt to be inappropriate - perhaps from considerations of speed, access to the necessary data, reliability or elegance. In such cases, the obvious solution is to provide C code that can be compiled into the agent itself to implement the desired module. Many of the more recent developments in the code structure have been intended to ease this process. In particular, one of the more recent additions to the suite is the tool mib2c. This is designed to take a portion of the MIB tree (as defined by a MIB file) and generate the code skeleton necessary to implement this. This document will cover the use mib2c, as well as describing the requirements and functionality of the code in more detail. In order to implement a new MIB module, three files are necessary, and these will be considered in turn. Note that, by the very nature of the task, this document cannot cover the details of precisely how to obtain the necessary information from the operating system or application. Instead, it describes the code framework that is needed, freeing the implementer from needing to understand the detailed internals of the agent, and allowing them to concentrate on the particular problem in hand. It may prove useful to examine some of the existing module implementations and examples in the light of this description, and suitable examples will be referred to at the appropriate points. However, it should be remembered that the UCD agent seeks to support a wide variety of systems, often with dramatically differing implementations and interfaces, and this is reflected in the complexity of the code. Also, the agent has developed gradually over the years, and there is often some measure of duplication or redundancy as a result. As the FAQ states, the official slogan of the UCD-SNMP developers is The current implementation is non-obvious and may need to be improved. This document describes the ideal, straightforward cases - real life is rarely so simple, and the example modules may prove easier to follow at a first reading. It is also advisable to have a compiled and installed implementation available before starting to extend the agent. This will make debugging and testing the agent much easier. A note regarding terminology - the word "module" is widely used throughout this document, with a number of different meanings. * support for a new MIB, i.e. the whole of the functionality that is required. This is usually termed a MIB module; * a self-contained subset of this, implemented as a single unit. This is usually termed an implementation module (or simply "a module"); * the combination of such subsets, usually termed a module group. Note that the first and third of these are often synonymous - the difference being that a MIB module refers to the view from outside the agent, regarding this as a seamless whole and hiding the internal implementation. A "module group" is used where the internal structure is of more relevance, and recognises the fact that the functionality may be provided by a number of co-operating implementation modules. Anyway, enough waffle - on with the details: The three files needed are * a MIB definition file; * a C header file; * a C implementation file. The next part looks at the MIB definition file, and how this impacts on the agent implementation. 2. The MIB File =============== The first file needed is the MIB file that defines the MIB module to be implemented. Strictly speaking, this is not absolutely necessary, as the agent itself does not make any direct use of the MIB definitions. However, it is advisable to start with this for three reasons: * It provides an initial specification for what is to be implemented. Code development is always easier if you know what you are meant to be writing! * If the new MIB file is read in with the other MIB files, this lets the applications provided with the suite be used to test the new agent, and report (hopefully meaningful) symbolic OIDs and values, rather than the bare numeric forms. (N.B: Remember to tell the application to load the new MIB. See the relevant question in the FAQ) * The tool mib2c uses this description to produce the two code files. This is by far the easiest way to develop a new module. (Note that the v5 version of mib2c is generally similar, but does not correspond exactly to the v4 version described here) If the intention is to implement a 'standard' MIB module, or a vendor-specific one, then the construction of this file will have already been done for you. If the intention is to provide a totally new, private module, then you will need to write this yourself, in addition to the agent code files. A description of MIB file format and syntax is beyond the scope of this document, and most books on SNMP management should provide some information on this subject. One book which concentrates on this is Understanding SNMP MIBS (Perkins & McGinnis, Prentice Hall, ISBN 0-13-437708-7). This blatant plug is wholly unrelated to the fact that David Perkins is an active member of the development group, and is regarded as our resident "protocol guru and policeman". (In fact, this book concentrates on MIB files in rather more detail than is appropriate in more general SNMP works). Information on other books covering SNMP and Network Management more generally is available on the SimpleWeb site (among other places). See the FAQ for more details. Assigned OID numbers -------------------- One word of advice - even if you are developing a totally private MIB module, you will still need to position this somewhere within the overall MIB tree. Please do NOT simply choose a location "at random". Any such is likely to have either been assigned to some other organisation, or may be so assigned some time in the future. However much you may regard your project as a totally internal affair, such projects have a tendency to exceed their expected scope, both in terms of lifetime and distribution (not to mention the potential OID clash if you subsequently need to use elements from the legitimate owner's tree). It is simple and cheap (i.e. free!) to obtain your own official segment of the MIB tree (see http://www.iana.org for an application form), and having done so, you then have complete global authority over it. If you have problems with this, it's worth contacting the development team (email: net-snmp-coders@lists.sourceforge.net) for advice. Please do think to the future, and be a good Net citizen by using a legitimately assigned OID as the root of your new MIB. MIB division ------------ The next point to consider, whether writing by hand or using mib2c, implementing an existing MIB, or writing a new one, is whether and how to divide up the MIB tree. This is a purely internal implementation decision, and will not be visible to management applications querying the agent. A sensible choice of partitioning will result in a simpler, clearer implementation, which should ease both the initial development and subsequent maintenance of the module. Unfortunately, this choice is one of the module-specific decisions, so must be made on a case-by-case basis. For a simple, self-contained module, it may well be reasonable to implement the module as a single block (examples include the SNMP statistics subtree RFC 1907 or the TCP subtree RFC 2011). More complex and diverse modules (such as the Host Resources MIB - RFC 1514) are more naturally considered as a number of individual sub-modules. Some guidelines to bear in mind when deciding on this division: * A MIB sub-tree consisting purely of scalar objects with a common OID prefix would normally be handled in a single implementation module; * Separate scalar subtrees would normally be in different implementation modules; * A table can either be handled within the same implementation module as related scalar objects in the same subtree, or in a separate implementation module; * Variables that rely on the same underlying data structure to retrieve their values, should probably be in the same implementation module (and conversely, (though less so) those that don't, shouldn't). As an initial rule of thumb, a good initial division is likely to be obtained by treating each table and each scalar sub-tree separately. This can be seen in the current agent, where most of the MIB-II modules (RFC 1213) are implemented in separate files (see the files under mibgroup/mibII). Note that many of these combine scalar and table handling in the same file, though they are implemented using separate routines. This is also the approach used by mib2c, which constructs a single pair of code files, but uses a separate routine for each table (and another for all the scalar variables). Ultimately, the final consideration (concerning the underlying data) is the most important, and should guide the basic division. For example, the Host Resources Running Software and Running Software Performance modules, while separate in the MIB tree, use the same underlying kernel data and so are implemented together. MIB name -------- The final requirement at this stage is to choose a name for each implementation module. This should be reasonably short, meaningful, unique and unlikely to clash with other (existing or future) modules. Mib2c uses the label of the root node of the MIB sub-tree as this name, and this is a reasonable choice in most cases. Recent changes to the agent code organisation have introduced the idea of module groups of related implementation modules. This is used, for example, to identify the constituent modules of a 'split' MIB (such as the Host Resources MIB), or those relating to a particular organisation (such as UCD). As with the division, this naming and grouping is a purely internal matter, and is really only visible when configuring and compiling the agent. So much for the MIB file. The next part considers the C header file. 3. The C code header file ========================= If the MIB file is the definition of the module for external network management applications (where applications includes network management personnel!), then the header file has traditionally served effectively the same purpose for the agent itself. Recent changes to the recommended code structure has resulted in the header file becoming increasingly simpler. It now simply contains definitions of the publically visible routines, and can be generated completely by mib2c. Function prototypes ------------------- For those interested in the details of this file (for example, if coding a module by hand), then the details of these definitions are as follows. Every header file will have the following two function prototype definitions extern void init_example (void); extern FindVarMethod var_example; If the module includes any tables, or other collections of variables that are implemented in separate routines, then this second definition will be repeated for each of these. In addition, if any of the variables can be SET (and it is intended to implement them as such), there will be a function prototype definitions for each of these, of the form: extern WriteMethod write_varName; These prototypes are in fact typedef'ed in . Module dependencies ------------------- This header file is also used to inform the compilation system of any dependancies between this module and any others. There is one utility module which is required by almost every module, and this is included using the directive config_require( util_funcs ) (which is produced automatically by mib2c). This same syntax can be used to trigger the inclusion of other related modules. An example of this can be seen in mibII/route_write.h which relies on the mibII/ip module, thus: config_require( mibII/ip ) One use of this directive is to define a module group, by supplying a header file consisting exclusively of such config_require directives. It can then be included or excluded from the agent very simply. Examples of this can be seen in mibgroup/mibII.h or mibgroup/host.h, which list the consituent sub-modules of the MIB-II and Host Resources MIBs respectively. MIB file information -------------------- Most of the information in this file is (understandably) aimed at the network management agent itself. However, there is one common header file directive that is actually intended to affect the utility commands that are included within the full distribution: config_add_mib( HOST-RESOURCES-MIB ) This is used to add the MIB file being implemented to the default list of MIBs loaded by such commands. This means that querying the agent will return informative names and values, rather than the raw numeric forms that SNMP actually works with. Of course, it is always possible for the utilities to specify that this MIB should be loaded anyway. But specifying this file within the module header file is a useful hint that a particular MIB should be loaded, without needing to ask for it explicitly. Note that this will only affect the binaries compiled as part of the same configuration run. It will have no effect on pre-installed binaries, or those compiled following a different configuration specification. Magic Numbers ------------- The other common element within the header file defines a set of "magic numbers" - one for each object within the implementation module. In fact, this can equally well appear within the main code file, as part of the variable structure (which will be described in the next part). This is the technique used by mib2c, but most handcrafted modules have tended to define these as part of the header file, probably for clarity. The only necessity is that the names and values are distinct (or more precisely, the values are distinct within a single variable handling routine). In practise, they tend to be defined using integers incrementing from 1, or as the same as the final sub-identifier of the corresponding MIB object (or indeed both, as these are frequently themselves successive integers). This is not mandatory, and a counter-example can be seen in the example module, where two of the object form a sub-tree, and the corresponding magic numbers are based on the final *two* sub-identifiers (to ensure that the values are unique). But this construction is definitely unusual, and the majority of modules simply use successive integers. Header file protection ---------------------- Normally, the only other contents of the header file will be the #ifndef/#define/#endif statements surrounding the whole file. This is used to ensure that the header file is only included once by any source code file (or more accurately, that there is no effect if it is inadvertantly included a second time). Again, as with the rest of the header file, this is generated automatically by mib2c. Having finished all the preparatory work (or let mib2c deal with it), the next part starts to look at the code file that actually implements the module. 4. Core structure of the implementation code ============================================ The core work of implementing the module is done in the C code file. As indicated earlier, much of the detail of this will be dependent on the particular module being implemented, and this can only be described by the individual programmer concerned. However, there is a fairly clearly defined framework that the implementation will need to follow, though this varies slightly depending on the style of the module being implemented (in particular whether it forms a table or a series of individual values). The differences will be covered in the following pages, but we first need to consider the overall shape of the framework, and the elements that are common to all styles. These are essentially the compulsory routines, the common header definitions, and assorted initialisation code. As with the header file, most of this will be generated automatically by mib2c. Standard includes ----------------- Certain header files are either compulsory, or required so frequently that they should be included as a matter of course. These are as follows: #include // local SNMP configuration details #include "mib_module_config.h" // list of which modules are supported #if HAVE_STDLIB_H #include #endif #if HAVE_STRING_H #include #else #include #endif #include All of these will usually be the first files to be included. #include "mibincl.h" // Standard set of SNMP includes #include "util_funcs.h" // utility function declarations #include "read_config.h" // if the module uses run-time // configuration controls #include "auto_nlist.h" // structures for a BSD-based // kernel using nlist #include "system.h" #include "name.h" // the module-specific header These conventionally come at the end of the list of includes. In between will come all the standard system-provided header files required for the library functions used in the file. Module definition ----------------- Much of the code defining the contents of the MIB has traditionally been held in the header file. However, much of this has slowly migrated to the code file, and this is now the recommended location for it (as typified by the output of mib2c). The main element of this is a variable structure specifying the details of the objects implemented. This takes the form of an unconstrained array of type struct variableN (where N is the length of the longest suffix in the table). Thus struct variable2 example_variables[] = { }; Each entry corresponds to one object in the MIB tree (or one column in the case of table entries), and these should be listed in increasing OID order. A single entry consists of six fields: * a magic number (the #defined integer constant described above) * a type indicator (from the values listed in ) * an access indicator (essentially NETSNMP_OLDAPI_RWRITE or NETSNMP_OLDAPI_RONLY) * the name of the routine used to handle this entry * the length of the OID suffix used, and * an array of integers specifying this suffix (more on this in a moment) Thus a typical variable entry would look like: { EXAMPLESTRING, ASN_OCTET_STR, NETSNMP_OLDAPI_RONLY, var_example, 1, {1}} If the magic numbers have not been defined in the header file, then they should be defined here, usually comming immediately before the corresponding variable entry. This is the technique used by mib2c. Note that in practise, only certain sizes of the structure variableN are defined (listed in ), being sufficient to meet the common requirements. If your particular module needs a non-supported value, the easiest thing is simply to use the next largest value that is supported. The module also needs to declare the location within the MIB tree where it should be registered. This is done using a declaration of the form oid example_variables_oid[] = { 1,3,6,1,4,1,2021,254 } where the contents of the array give the object identifier of the root of the module. Module initialisation --------------------- Many modules require some form of initialisation before they can start providing the necessary information. This is done by providing a routine called init_{name} (where {name} is the name of the module). This routine is theoretically optional, but in practise is required to register this module with the main agent at the very least. This specifies the list of variables being implemented (from the variableN structure) and declare where these fit into the overall MIB tree. This is done by using the REGISTER_MIB macro, as follows: REGISTER_MIB( "example", example_variables, variable2, example_variables_oid ); where "example" is used for identification purposed (and is usually the name being used for the module), example_variables is the structure defining the variables being implemented, variable2 is the type used for this structure, and example_variables_oid is the location of the root. In fact, this macro is simply a wrapper round the routine register_mib(), but the details of this can safely be ignored, unless more control over the registration is required. One common requirement, particularly on older operating systems or for the more obscure areas of the system, is to be able to read data directly from kernel memory. The preparation for this is typically done here by one or more statements of the form #ifdef {NAME}_SYMBOL auto_nlist( {NAME}_SYMBOL, 0, 0); #endif where {NAME}_SYMBOL is defined as part of the system-specific configuration, to be the name of the appropriate kernel variable or data structure. (The two 0 values are because the kernel information is simply being primed at this point - this call will be reused later when the actual values are required). Note that this is probably the first thing described so far which isn't provided by mib2c! Other possibilities for initialisation may include registering config file directive handlers (which are documented in the read_config(5) man page), and registering the MIB module (either in whole or in part) in the sysOR table. The first of these is covered in the example module, and the second in many of the other modules within the main UCD distribution. Variable handling ----------------- The other obligatory routine is that which actually handles a request for a particular variable instance. This is the routine that appeared in the variableN structure, so while the name is not fixed, it should be the same as was used there. This routine has six parameters, which will be described in turn. Four of these parameters are used for passing in information about the request, these being: struct variable *vp; // The entry in the variableN array from the // header file, for the object under consideration. // Note that the name field of this structure has been // completed into a fully qualified OID, by prepending // the prefix common to the whole array. oid *name; // The OID from the request int *length; // The length of this OID int exact; // A flag to indicate whether this is an exact // request (GET/SET) or an 'inexact' one (GETNEXT) Four of the parameters are used to return information about the answer. The function also returns a pointer to the actual data for the variable requested (or NULL if this data is not available for any reason). The other result parameters are: oid *name; // The OID being returned int *length; // The length of this OID int *var_len; // The length of the answer being returned WriteMethod **write_method; // A pointer to the SET function for this variable Note that two of the parameters (name and length) serve a dual purpose, being used for both input and output. The first thing that this routine needs to do is to validate the request, to ensure that it does indeed lie in the range implemented by this particular module. This is done in slightly different ways, depending on the style of the module, so this will be discussed in more detail later. At the same time, it is common to retrieve some of the information needed for answering the query. Then the routine uses the Magic Number field from the vp parameter to determine which of the possible variables being implemented is being requested. This is done using a switch statement, which should have as many cases as there are entries in the variableN array (or more precisely, as many as specify this routine as their handler), plus an additional default case to handle an erroneous call. Each branch of the switch statement needs to ensure that the return parameters are filled in correctly, set up a (static) return variable with the correct data, and then return a pointer to this value. These can be done separately for each branch, or once at the start, being overridden in particular branches if necessary. In fact, the default validation routines make the assumption that the variable is both read-only, and of integer type (which includes the COUNTER and GAUGE types among others), and set the return paramaters write_method and var_len appropriately. These settings can then be corrected for those cases when either or both of these assumptions are wrong. Examples of this can be seen in the example module. EXAMPLEINTEGER is writeable, so this branch sets the write_method parameter, and EXAMPLEOBJECTID is not an integer, so this branch sets the var_len parameter. In the case of EXAMPLESTRING, both assumptions are wrong, so this branch needs to set both these parameters explicitly. Note that because the routine returns a pointer to a static result, a suitable variable must be declared somewhere for this. Two global variables are provided for this purpose - long_return (for integer results) and return_buf (for other types). This latter is a generic array (of type u_char) that can contain up to 256 bytes of data. Alternatively, static variables can be declared, either within the code file, or local to this particular variable routine. This last is the approach adopted by mib2c, which defines four such local variables, (long_ret, string, objid and c64). Mib2c requirements ------------------ Most of the code described here is generated by mib2c. The main exceptions (which therefore need to be provided by the programmer) are * Any initialisation, other than the basic registration (including kernel data initialisation, config file handling, or sysOR registration). * Retrieving the necessary data, and setting the appropriate return value correctly. * The var_len (and possibly write_method) return parameters for variable types that are not recognised by mib2c * The contents of any write routines (see later). Everything else should be useable as generated. This concludes the preliminary walk-through of the general structure of the C implementation. To fill in the details, we will need to consider the various styles of module separately. The next part will look at scalar (i.e. non-table based) modules. 5. Non-table-based modules ========================== Having looked at the general structure of a module implementation, it's now time to look at this in more detail. We'll start with the simplest style of module - a collection of independent variables. This could easily be implemented as a series of completely separate modules - the main reason for combining them is to avoid the proliferation of multiple versions of very similar code. Recall that the variable handling routine needs to cover two distinct purposes - validation of the request, and provision of the answer. In this style of module, these are handled separately. Once again, mib2c does much of the donkey work, generating the whole of the request validation code (so the description of this section can be skipped if desired), and even providing a skeleton for returning the data. This latter still requires some input from the programmer, to actually return the correct results (rather than dummy values). Request Validation ------------------ This is done using a standard utility function header_generic. The parameters for this are exactly the same as for the main routine, and are simply passed through directly. It returns an integer result, as a flag to indicate whether the validation succeeded or not. If the validation fails, then the main routine should return immediately, leaving the parameters untouched, and indicate the failure by returning a NULL value. Thus the initial code fragment of a scalar-variable style implementation will typically look like: u_char * var_system(vp, name, length, exact, var_len, write_method) { if (header_generic(vp, name, length, exact, var_len, write_method) == MATCH_FAILED ) return NULL; [ etc, etc, etc ] } Although the utility function can be used as a "black box", it's worth looking more closely at exactly what it does (since the table-handling modules will need to do something fairly similar). It has two (or possibly three) separate functions: * checking that the request is valid, * setting up the OID for the result, * and (optionally) setting up default values for the other return parameters. In order to actually validate the request, the header routine first needs to construct the OID under consideration, in order to compare it with that originally asked for. The driving code has already combined the OID prefix (constant throughout the module) with the entry-specific suffix, before calling the main variable handler. This is available via the name field of the parameter vp. For a scalar variable, completing the OID is therefore simply a matter of appending the instance identifier 0 to this. The full OID is built up in a local oid array newname defined for this purpose. This gives the following code fragment: int header_generic(vp, name, length, exact, var_len, write_method) { oid newname[MAX_OID_LEN]; memcpy((char *)newname, (char *)vp->name, (int)vp->namelen * sizeof(oid)); newname[ vp->namelen ] = 0; : } Having formed the OID, this can then be compared against the variable specified in the original request, which is available as the name parameter. This comparison is done using the snmp_oid_compare function, which takes the two OIDs (together with their respective lengths), and returns -1, 0 or 1 depending on whether the first OID precedes, matches or follows the second. In the case of an 'exact' match (i.e. a GET/SET/etc), then the request is only valid if the two OIDs are identical (snmp_oid_compare returns 0). In the case of a GETNEXT (or GETBULK) request, it's valid if the OID being considered comes after that of the original request (snmp_oid_compare returns -1). This gives the code fragment result = snmp_oid_compare(name, *length, newname, (int)vp->namelen + 1); // +1 because of the extra instance sub-identifier if ((exact && (result != 0)) // GET match fails || (!exact && (result >= 0))) // GETNEXT match fails return(MATCH_FAILED); Note that in this case, we're only interested in the single variable indicated by the vp parameter. The fact that this module may well implement other variables as well is ignored. The 'lexically next' requirement of the GETNEXT request is handled by working through the variable entries in order until one matches. And yes, this is not the most efficient implementation possible! Note that in releases prior to 3.6, the snmp_oid_compare function was called simply compare. Finally, having determined that the request is valid, this routine must update the name and length parameters to return the OID being processed. It also sets default values for the other two return parameters. memcpy( (char *)name,(char *)newname, ((int)vp->namelen + 1) * sizeof(oid)); *length = vp->namelen + 1; *write_method = 0; // Non-writeable *var_len = sizeof(long); // default to integer results return(MATCH_SUCCEEDED); These three code fragments combine to form the full header_generic code which can be seen in the file util_funcs.c Note: This validation used to be done using a separate function for each module (conventionally called header_{name}), and many modules may still be coded in this style. The code for these are to all intents and purposes identical to the header_generic routine described above. Data Retrieval -------------- The other main job of the request handling routine is to retrieve any necessary data, and return the appropriate answer to the original request. This must be done even if mib2c is being used to generate the framework of the implementation. As has been indicated earlier, the different cases are handled using a switch statement, with the Magic Number field of the vp parameter being used to distinguish between them. The data necessary for answering the request can be retrieved for each variable individually in the relevant case statement (as is the case with the system group), or using a common block of data before processing the switch (as is done for the ICMP group, among others). With many of the modules implemented so far, this data is read from a kernel structure. This can be done using the auto_nlist routine already mentioned, providing a variable in which to store the results and an indication of its size (see the !HAVE_SYS_TCPIPSTATS_H case of the ICMP group for an example). Alternatively, there may be ioctl calls on suitable devices, specific system calls, or special files that can be read to provide the necessary information. If the available data provides the requested value immediately, then the individual branch becomes a simple assignment to the appropriate static return variable - either one of the global static variables (e.g. long_return) or the local equivalents (such as generated by mib2c). Otherwise, the requested value may need to be calculated by combining two or more items of data (e.g. IPINHDRERRORS in mibII/ip.c) or by applying a mapping or other calculation involving available information (e.g. IPFORWARDING from the same group). In each of these cases, the routine should return a pointer to the result value, casting this to the pseudo-generic (u_char *) So much for the scalar case. The next part looks at how to handle simple tables. 6. Simple tables ================ Having considered the simplest style of module implementation, we now turn our attention to the next style - a simple table. The tabular nature of these is immediately apparent from the MIB definition file, but the qualifier "simple" deserves a word of explanation. A simple table, in this context, has four characteristics: 1. It is indexed by a single integer value; 2. Such indices run from 1 to a determinable maximum; 3. All indices within this range are valid; 4. The data for a particular index can be retrieved directly (e.g. by indexing into an underlying data structure). If any of the conditions are not met, then the table is not a pure simple one, and the techniques described here are not applicable. The next section of this guide will cover the more general case. (In fact, it may be possible to use the bulk of the techniques covered here, though special handling will be needed to cope with the invalid assumption or assumptions). Note that mib2c assumes that all tables are simple. As with the scalar case, the variable routine needs to provide two basic functions - request validation and data retrieval. Validation ---------- This is provided by the shared utility routine header_simple_table. As with the scalar header routine, this takes the same parameters as the main variable routine, with one addition - the maximum valid index. Mib2c generates a dummy token for this, which must be replaced by the appropriate value. As with the header routine, it also returns an indication of whether the request was valid, as well as setting up the return parameters with the matching OID information, and defaults for var_len and write_method. Note that in releases prior to 3.6, this job was performed by the routine checkmib. However, the return values of this were the reverse of those for generic_header and header_simple_table. A version of checkmib is still available for compatability purposes, but you are encouraged to use header_simple_table instead. The basic code fragment (see ucd-snmp/disk.c) is therefore of the form: unsigned char * var_extensible_disk(vp, name, length, exact, var_len, write_method) { if (header_simple_table(vp,name,length,exact,var_len,write_method,numdisks) == MATCH_FAILED) return(NULL); [ etc, etc, etc ] } Note that the maximum index value parameter does not have to be a permanently fixed constant. It specifies the maximum valid index at the time the request is processed, and a subsequent request may have a different maximum. An example of this can be seen in mibII/sysORTable.c where the table is held purely internally to the agent code, including its size (and hence the maximum valid index). This maximum could also be retrieved via a system call, or via a kernel data variable. Data Retrieval -------------- As with the scalar case, the other required function is to retrieve the data requested. However, given the definition of a simple table this is simply a matter of using the single, integer index sub-identifier to index into an existing data structure. This index will always be the last index of the OID returned by header_simple_table, so can be obtained as name[*length-1]. A good example of this type of table can be seen in ucd-snmp/disk.c With some modules, this underlying table may be relatively large, or only accessible via a slow or cumbersome interface. The implementation described so far may prove unacceptably slow, particularly when walking a MIB tree requires the table to be loaded afresh for each variable requested. In these circumstances, a useful technique is to cache the table when it is first read in, and use that cache for subsequent requests. This can be done by having a separate routine to read in the table. This uses two static variables, one a structure or array for the data itself, and the other an additional timestamp to indicate when the table was last loaded. When a call is made to this routine to "read" the table, it can first check whether the cached table is "new enough". If so, it can return immediately, and the system will use the cached data. Only if the cached version is sufficiently old that it's probably out of date, is it necessary to retrieve the current data, updating the cached version and the timestamp value. This is particularly useful if the data itself is relatively static, such as a list of mounted filesystems. There is an example of this technique in the Host Resources implementation. As with the scalar case, mib2c simply provides placeholder dummy return values. It's up to the programmer to fill in the details. The next part concludes the examination of the detailed implementation by looking at more general tables. 7. General Tables ================= Some table structures are not suitable for the simple table approach, due to the failure of one or more of the assumptions listed earlier. Perhaps they are indexed by something other than a single integer (such as a 4-octet IP address), or the maximum index is not easily determinable (such as the interfaces table), or not all indices are valid (running software), or the necessary data is not directly accessible (interfaces again). In such circumstances, a more general approach is needed. In contrast with the two styles already covered, this style of module will commonly combine the two functions of request validation and data retrieval. Note that mib2c will assume the simple table case, and this will need to be corrected. General table algorithm ----------------------- The basic algorithm is as follows: Perform any necessary initialization, then walk through the underlying instances, retrieving the data for each one, until the desired instance is found. If no valid entry is found, return failure. For an exact match (GET and similar), identifying the desired instance is trivial - construct the OID (from the 'vp' variable parameter and the index value or values), and see whether it matches the requested OID. For GETNEXT, the situation is not quite so simple. Depending on the underlying representation of the data, the entries may be returned in the same order as they should appear in the table (i.e. lexically increasing by index). However, this is not guaranteed, and the natural way of retrieving the data may be in some "random" order. In this case, then the whole table needs to be traversed for each request. in order to determine the appropriate successor. This random order is the worst case, and dictates the structure of the code used in most currently implemented tables. The ordered case can be regarded as a simplification of this more general one. The algorithm outlined above can now be expanded into the following pseudo-code: Init_{Name}_Entry(); // Perform any necessary initialisation while (( index = Get_Next_{Name}_Entry() ) != EndMarker ) { // This steps through the underlying table, // returning the current index, // or some suitable end-marker when all // the entries have been examined. // Note that this routine should also return the // data for this entry, either via a parameter // or using some external location. construct OID from vp->name and index compare new OID and request if valid { save current data if finished // exact match, or ordered table break; // so don't look at any more entries } // Otherwise, we need to loop round, and examine // the next entry in the table. Either because // the entry wasn't valid for this request, // or the entry was a possible "next" candidate, // but we don't know that there isn't there's a // better one later in the table. } if no saved data // Nothing matched return failure // Otherwise, go on to the switch handling // we've already covered in the earlier styles. This is now very close to the actual code used in many current implementations (such as the the routine header_ifEntry in mibII/interfaces.c). Notice that the pseudo-code fragment if valid expands in practise to if ((exact && (result == 0)) || // GET request, and identical OIDs (!exact && (result < 0)) ) // GETNEXT, and candidate OID is later // than requested OID. This is a very common expression, that can be seen in most of the table implementations. Notice also that the interfaces table returns immediately the first valid entry is found, even for GETNEXT requests. This is because entries are returned in lexical order, so the first succeeding entry will be the one that's required. (As an aside, this also means that the underlying data can be saved implicitly within the 'next entry' routine - not very clean, but it saves some unnecessary copying). The more general case can be seen in the TCP and UDP tables (see mibII/tcp.c and mibII/udp.c). Here, the if valid fragment expands to: if ( exact && (result == 0)) { // save results break; } else if (!exact && (result < 0)) { if ( .... ) { // no saved OID, or this OID // precedes the saved OID // save this OID into 'lowest' // save the results into Lowinpcb // don't break, since we still need to look // at the rest of the table } } The GET match handling is just as we've already seen - is this the requested OID or not. If so, save the results and move on to the switch statement. The GETNEXT case is more complicated. As well as considering whether this is a possible match (using the same test we've already seen), we also have to check whether this is a better match than anything we've already seen. This is done by comparing the current candidate (newname) with the best match found so far (lowest). Only if this extra comparison shows that the new OID is earlier than the saved one, do we need to save both the new OID, and any associated data (such as the inpcb block, and state flag). But having found one better match, we don't know that there isn't an even better one later on. So we can't break out of the enclosing loop - we need to keep going and examine all the remaining entries of the table. These two cases (the TCP and UDP tables) also show a more general style of indexing. Rather than simply appending a single index value to the OID prefix, these routines have to add the local four-octet IP address plus port (and the same for the remote end in the case of the TCP table). This is the purpose of the op and cp section of code that precedes the comparison. These two are probably among the most complex cases you are likely to encounter. If you can follow the code here, then you've probably cracked the problem of understanding how the agent works. Finally, the next part discusses how to implement a writable (or SETable) object in a MIB module. 8. How to implement a SETable object ==================================== Finally, the only remaining area to cover is that of setting data - the handling of SNMPSET. Particular care should be taken here for two reasons. Firstly, any errors in the earlier sections can have limited effect. The worst that is likely to happen is that the agent will either return invalid information, or possibly crash. Either way, this is unlikely to affect the operation of the workstation as a whole. If there are problems in the writing routine, the results could be catastrophic (particularly if writing data directly into kernel memory). Secondly, this is the least well understood area of the agent, at least by the author. There are relatively few variables that are defined as READ-WRITE in the relevant MIBs, and even fewer that have actually been implemented as such. I'm therefore describing this from a combination of my understanding of how SETs ought to work, personal experience of very simple SET handling and what's actually been done by others (which do not necessarily coincide). There are also subtle differences between the setting of simple scalar variables (or individual entries within a table), and the creation of a new row within a table. This will therefore be considered separately. With these caveats, and a healthy dose of caution, let us proceed. Note that the UCD-SNMP development team can accept no responsibility for any damage or loss resulting from either following or ignoring the information presented here. You coded it - you fix it! Write routine ------------- The heart of SET handling is the write_method parameter from the variable handling routine. This is a pointer to the relevant routine for setting the variable in question. Mib2c will generate one such routine for each setable variable. This routine should be declared using the template int write_variable( int action, u_char *var_val, u_char var_val_type, int var_val_len, u_char *statP, oid *name, int name_len ); Most of these parameters are fairly self explanatory: The last two hold the OID to be set, just as was passed to the main variable routine. The second, third and fourth parameters provide information about the new desired value, both the type, value and length. This is very similar to the way that results are returned from the main variable routine. The return value of the routine is simply an indication of whether the current stage of the SET was successful or not. We'll come back to this in a minute. Note that it is the responsibility of this routine to check that the OID and value provided are appropriate for the variable being implemented. This includes (but is not limited to) checking: * the OID is recognised as one this routine can handle (this should be true if the routine only handles the one variable, and there are no errors in the main variable routine or driving code, but it does no harm to check). * the value requested is the correct type expected for this OID * the value requested is appropriate for this OID (within particular ranges, suitable length, etc, etc) There are two parameters remaining to be considered. The fifth parameter, statP, is the value that would be returned from a GET request on this particular variable. It could be used to check that the requested new value is consistent with the current state, but its main use is to denote that a new table row is being created. In most cases (particularly when dealing with scalar values or single elements of tables), you can normally simply ignore this parameter. Actions ------- The final parameter to consider is the first one - action. To understand this, it's necessary to know a bit about how SETs are implemented. The design of SNMP calls for all variables in a SET request to be done "as if simultaneously" - i.e. they should all succeed or all fail. However, in practise, the variables are handled in succession. Thus, if one fails, it must be possible to "undo" any changes made to the other variables in the request. This is a well understood requirement in the database world, and is usually implemented using a "multi-stage commit". This is certainly the mechanism expected within the SNMP community (and has been made explicit in the work of the AgentX extensibility group). In other words, the routine to handle setting a variable will be called more than once, and the routine must be able to perform the appropriate actions depending on how far through the process we currently are. This is determined by the value of the action parameter. This is implemented using three basic phases: RESERVE is used to check the syntax of all the variables provided, that the values being set are sensible and consistent, and to allocate any resources required for performing the SET. After this stage, the expectation is that the set ought to succeed, though this is not guaranteed. (In fact, with the UCD agent, this is done in two passes - RESERVE1, and RESERVE2, to allow for dependancies between variables). If any of these calls fail (in either pass) the write routines are called again with the FREE action, to release any resources that have been allocated. The agent will then return a failure response to the requesting application. Assuming that the RESERVE phase was successful, the next stage is indicated by the action value ACTION. This is used to actually implement the set operation. However, this must either be done into temporary (persistent) storage, or the previous value stored similarly, in case any of the subsequent ACTION calls fail. This can be seen in the example module, where both write routines have static 'old' variables, to hold the previous value of the relevant object. If the ACTION phase does fail (for example due to an apparently valid, but unacceptable value, or an unforeseen problem), then the list of write routines are called again, with the UNDO action. This requires the routine to reset the value that was changed to its previous value (assuming it was actually changed), and then to release any resources that had been allocated. As with the FREE phase, the agent will then return an indication of the error to the requesting application. Only once the ACTION phase has completed successfully, can the final COMMIT phase be run. This is used to complete any writes that were done into temporary storage, and then release any allocated resources. Note that all the code in this phase should be "safe" code that cannot possibly fail (cue hysterical laughter). The whole intent of the ACTION/COMMIT division is that all of the fallible code should be done in the ACTION phase, so that it can be backed out if necessary. Table row creation ------------------ What about creating new rows in a table, I hear you ask. Good Question. This case can often be detected by the fact that a GET request would have failed, and hence the fifth parameter, statP, will be null. This contrasts with changing the values of an element of an existing row, when the statP parameter would hold the previous value. The details of precisely how to create a new row will clearly depend on the underlying format of the table. However, one implementation strategy would be as follows: * The first column object to be SET would return a null value from the var_name routine. This null statP parameter would be the signal to create a new temporary instance of the underlying data structure, filled with dummy values. * Subsequent column objects would return pointers to the appropriate field of this new data structure from the var_name routine, which would then be filled in by the write routine. * Once all the necessary fields had been SET, the completed temporary instance could be moved into the "standard" structure (or copied, or otherwise used to set things up appropriately). However, this is purely a theoretical strategy, and has not been tried by the author. No guarantees are given as to whether this would actually work. There are also questions regarding how to handle incomplete or overlapping SET requests. Anyone who has experience of doing this, please get in touch! ------------------------------------------------------------------------ And that's it. Congratulations for getting this far. If you understand everything that's been said, then you now know as much as the rest of us about the inner workings of the UCD-SNMP agent. (Well, very nearly). All that remains is to try putting this into practise. Good luck! And if you've found this helpful, gifts of money, chocolate, alcohol, and above all feedback, would be most appreciated :-) ------------------------------------------------------------------------ Copyright 1999, 2000 - D.T.Shield. This file may be distributed as part of a source or binary packaging of the Net-SNMP software suite. It may not be distributed independently without the explicit permission of the author. PK{0]UmEEFAQnu[ Frequently Asked Questions (FAQ) for the UCD/Net-SNMP package ============================================================= FAQ Author: Dave Shield Net-SNMP Version: 5.8 Net-SNMP/UCD-SNMP Project Leader: Wes Hardaker Email: net-snmp-coders@lists.sourceforge.net TABLE OF CONTENTS ================= TABLE OF CONTENTS GENERAL What is it? Where can I get it? What documentation is available? Are there binaries available? What's the difference between UCD-SNMP and Net-SNMP? What operating systems does it run on? What happens if mine isn't listed? Does it run on Windows? How do I find out about new releases? How can I find out what other people are doing? How do I submit a patch or bug report? Can I reuse the code in my commercial application? What's the difference between SNMPv1, SNMPv2 and SNMPv3? What's the difference between SNMPv2 and SNMPv2c? Which versions of SNMP are supported in this package? Can I use SNMPv1 requests with an SNMPv2 MIB (or vice versa)? How can I monitor my system with SNMP? Where can I find more information about network management? What ports does SNMP use? Is Net-SNMP thread safe? APPLICATIONS How do I add a MIB? How do I add a MIB to the tools? Why can't I see anything from the agent? Why doesn't the agent respond? I can see the system group, but nothing else. Why? Why can't I see values in the tree? The agent worked for a while, then stopped responding. Why? Requesting an object fails with "Unknown Object Identifier" Why? Why do I get "noSuchName" when asking for "sysUpTime" (or similar)? Why do I sometimes get "End of MIB" when walking a tree, and sometimes not? How do I use SNMPv3? Why can't I set any variables in the MIB? Variables seem to disappear when I try to set them. Why? Why can't I change sysLocation (or sysContact)? I get an error when trying to set a negative value - why? I get an error when trying to query a string-indexed table value - why? How should I specify string-indexed table values? How do I send traps and notifications? How do I receive traps and notifications? How do I receive SNMPv1 traps? Why don't I receive incoming traps? My traphandler script doesn't work when run like this - why not? How can the agent receive traps and notifications? How big can an SNMP request (or reply) be? How can I monitor my systems (disk, memory, etc)? Applications complain about entries in your example 'snmp.conf' file. Why? OK, what should I put in snmp.conf? How do I specify IPv6 addresses in tools command line arguments? PERL What is the purpose of the Perl SNMP module? Where can I get the Perl SNMP package? How do I install the Perl SNMP modules? But compiling this fails! Why? Compiling the Perl module works OK, but 'make test' fails. Why? Why can't mib2c (or tkmib) locate SNMP.pm? Why can't mib2c (or tkmib) load SNMP.so? Why can't tkmib locate Tk.pm? Why does your RPM complain about missing Perl modules? I've got a problem with the Net-SNMP module. Can you help? MIBS Where can I find a MIB compiler? Why aren't my MIB files being read in? Where should I put my MIB files? What does "Cannot find module (XXX-MIB)" mean? I'm getting answers, but they're all numbers. Why? What does "unlinked OID" mean? The parser doesn't handle comments properly. Why not? How can I get more information about problems with MIB files? What's this about "too many imported symbols"? Do I actually need the MIB files? AGENT What MIBs are supported? What protocols are supported? How do I configure the agent? How do I remove a MIB from the agent? I've installed a new MIB file. Why can't I query it? How do I add a MIB to the agent? What's the difference between 'exec', 'sh', 'extend' and 'pass'? What's the difference between AgentX, SMUX and proxied SNMP? What is the purpose of 'dlmod'? Which should I use? Can I use AgentX when running under Windows? How can I run AgentX with a different socket address? How can I turn off SMUX support? How can I combine two copies of the 'mib2' tree from separate subagents? What traps are sent by the agent? Where are these traps sent to? How can I send a particular trap to selected destinations? When I run the agent it runs and then quits without staying around. Why? After a while the agent stops responding, and starts eating CPU time. Why? How can I stop other people getting at my agent? How can I listen on just one particular interface? The agent is complaining about 'snmpd.conf'. Where is this? Why does the agent complain about 'no access control information'? How do I configure access control? How do I configure SNMPv3 users? The 'createUser' line disappears when I start the agent. Why? What's the difference between /var/net-snmp and /usr/local/share/snmp? My new agent is ignoring the old snmpd.conf file. Why? Where should the snmpd.conf file go? Why am I getting "Connection refused"? Why can't I see values in the UCDavis 'extensible' or 'disk' trees? Why can't I see values in the UCDavis 'memory' or 'vmstat' tree? What do the CPU statistics mean - is this the load average? How do I get percentage CPU utilization using ssCpuRawIdle? What about multi-processor systems? The speed/type of my network interfaces is wrong - how can I fix it? The interface statistics for my subinterfaces are all zero - why? Does the agent support the RMON-MIB? What does "klread: bad address" mean? What does "nlist err: wombat not found" (or similar) mean? What does "Can't open /dev/kmem" mean? The system uptime (sysUpTime) returned is wrong! Can the agent run multi-threaded? Can I use AgentX (or an embedded SNMP agent) in a threaded application? COMPILING How do I control the environment used to compile the software? How do I control the environment used to compile the software under Windows? Why does the compilation complain about missing libraries? How can I reduce the memory footprint? How can I reduce the installation footprint or speed up compilation? How can I compile the project for use on an embedded system? How can I compile the project to use static linking? Why does 'make test' skip various tests? Why does 'make test' complain about a pid file? CODING How do I write C code to integrate with the agent? How does the agent fetch the value of a MIB variable from the system? Mib2c complains about a missing "mib reference" - what does this mean? Mib2c complains about not having a "valid OID" - what does this mean? Why doesn't mib2c like the MIB file I'm giving it? Mib2c ignores my MIB and generates a pair of 'mib-2' code files. Why? What's the difference between the various mib2c configuration files? Which mib2c configuration file should I use? How can I have mib2c generate code for both scalars and tables? Are there any examples, or documentation for developing MIB modules? Where should I put the files produced by 'mib2c'? Why doesn't my new MIB module report anything? Why does the iterator call my get_{first,next} routines so often? How can I get the agent to generate a trap (or inform)? How can I get an AgentX sub-agent to generate a trap (or inform)? How can I get the agent to send an SNMPv1 (or SNMPv2c) trap? How can I get the agent to include varbinds with an SNMPv1 trap? How can I get the agent to send an SNMPv1 enterprise-specific trap? How can I get the agent to send an SNMPv3 trap (or inform)? Why does calling 'send_v2trap' generate an SNMPv1 trap (or vice versa)? How can I register a MIB module in a different (SNMPv3) context? MISC What ASN.1 parser is used? What is the Official Slogan of the net-snmp-coders list? GENERAL ======= What is it? ---------- - Various tools relating to the Simple Network Management Protocol including: * An extensible agent * An SNMP library * tools to request or set information from SNMP agents * tools to generate and handle SNMP traps * a version of the unix 'netstat' command using SNMP * a graphical Perl/Tk/SNMP based mib browser This package is originally based on the Carnegie Mellon University SNMP implementation (version 2.1.2.1), but has developed significantly since then. Where can I get it? ------------------ Download: - http://www.net-snmp.org/download/ Web page: - http://www.net-snmp.org/ Sourceforge Project page: - http://www.net-snmp.org/project/ Mirrors (note that sourceforge download servers are mirrored themselves): - Greece: ftp://ftp.ntua.gr/pub/net/snmp/net-snmp/ What documentation is available? ------------------------------- This FAQ (!) README and individual READMEs for various platforms README.thread (discusses threading issues) INSTALL PORTING EXAMPLE.conf man pages for the individual tools, files and the API A guide for extending the agent Tutorials for both ucd-snmp v4 and net-snmp v5 at http://www.net-snmp.org/tutorial/ and http://www.net-snmp.org/tutorial-5/ respectively Most of this documentation (plus archives of the mailing lists) is also available on our web page: http://www.net-snmp.org/ There is also a Wiki (including a community-maintained version of this FAQ) at http://www.net-snmp.org/wiki/ Are there binaries available? ---------------------------- There are binaries for some versions/systems available under the "net-snmp binaries" package on the SourceForge "Files" page, which is linked to from the main project download web page at http://www.net-snmp.org/download.html. These binaries are also available on the project FTP site, with a link on the same web page. What's the difference between UCD-SNMP and Net-SNMP? --------------------------------------------------- Not a great deal, really. Although the project originally started at UC Davis (hence the name), and it has always been based there, most of the contributors have had little or no connection with this institution. The move to SourceForge was intended to provide a more flexible environment for the project, and to distribute the administrative workload more evenly. The change of name simply reflects this move, which was the last remaining link with UC Davis. The 4.2.x line saw the last releases made using the ucd-snmp name, and all releases on this line have been been bug-fixes only. Release 5.0 was the first version released under the Net-SNMP name, and all further development is being done on the 5.x code base. The 4.2.x code line is now effectively closed down, as are the older 5.x branches. Much of the work done for the various 5.x releases has involved some fairly significant changes to the code - in particular the architecture of the agent. However attempts have been made to retain backwards compatibility as much as possible, and most code written for earlier releases should continue to work. The most visible change from the 4.2.x UCD suite to the 5.x Net-SNMP releases was a restructuring of the header file organisation - not least a change from to . But given the maturity of the Net-SNMP code, this should be less of a consideration for most current SNMP development projects. What operating systems does it run on? ------------------------------------- Both the applications and the agent have been reported as running (at least in part) on the following operating systems: * Linux (kernels 2.6 to 1.3) * Solaris/SPARC (11 to 2.3), Solaris/Intel (10, 9) -- see README.solaris * HP-UX (11.31 to 9.01) -- see README.hpux11 * Mac OS X (10.5 to 10.1) -- see README.osX * NetBSD (2.0 to 1.0) * FreeBSD (7.0 to 2.2) * OpenBSD (4.0 to 2.6) * BSDi (4.0.1 to 2.1) * AIX (6.1, 5.3, 5.2, 5.1, 4.3.3, 4.1.5, 3.2.5) -- see README.aix * IRIX (6.5 to 5.1) * OSF (4.0, 3.2 and Tru64 Unix 5.1B) -- see README.tru64 * SunOS 4 (4.1.4 to 4.1.2) * Ultrix (4.5 to 4.2) * Dynix/PTX 4.4 * QNX 6.2.1A We have also been informed about a port to the Stratus VOS. See http://ftp.stratus.com/vos/network/network.html for details. See the next question but one for the status of Windows support. Certain systems fail to compile particular portions of the agent. These can usually be persuaded to compile (at the loss of some functionality) by omitting the modules affected. See the next question for more details. Also note that the presence of a particular configuration in this list does not imply a perfect or complete implementation. This is simply what various people have reported as seeming to work. (Or more frequently, the configurations where people have reported problems that we think we've subsequently fixed!) What happens if mine isn't listed? --------------------------------- It's probably worth trying to compile it anyway. Unless your system is significantly different to the supported configurations, most of the code (library, applications and the agent infrastructure) should probably compile with little or no difficulty. The most likely source of problems will be MIB modules within the agent, as this tends to be where the most system-specific code is found. If only a few modules fail to compile, try removing them from the agent by running "configure --with-out-mib-module=xxx,yyy", and re-compiling. If a large number of modules fail, then it might be easier to start from a relatively bare system, using "configure --enable-mini-agent --with-defaults". Then if this minimal agent compiles and runs successfully, try adding each of the missing mibgroups individually using the configure option '--with-mib-module'. If configure fails with "invalid configuration" messages, or you get completely stuck, contact the coders list for advice. Similarly, if you manage to get this working on a new system, please let us know of any code changes that you needed to make, together with details of the hardware you're using, and what versions of the operating system you've tried it on. The entry 'host' in the file 'config.status' should show this information. Oh, and congratulations! Does it run on Windows? ---------------------- The suite should compile and run on Win32 platforms, including the library, command-line tools and the basic agent framework. Note that the agent now includes support for the MIB-II module, but this requires Microsoft's Core Platform SDK. Instructions for how to install this are given in README.win32. Pre-compiled binaries are available from the project web site. As of v5.4, the Net-SNMP agent is able to load the Windows SNMP service extension DLLs by using the Net-SNMP winExtDLL extension. Some other Net-SNMP MIB modules, including the UCD pass-through extensions, do not currently work under Windows. Volunteers to assist with these missing modules are likely to welcomed with open arms :-) Further details of Windows support (currently Visual C++, MinGW and Cygnus cygwin32) is available in the file README.win32. How do I find out about new releases? ------------------------------------ There is a mailing list for these announcements net-snmp-announce@lists.sourceforge.net To be added to (or removed from) this list, visit http://www.net-snmp.org/lists/net-snmp-announce/ Or you can send a message to the address net-snmp-announce-request@lists.sourceforge.net with a subject line of 'subscribe' (or 'unsubscribe' as appropriate). Advance notice of upcoming releases are also made on the net-snmp-users list (for "release candidates") for a week or two before the full release, and on the net-snmp-coders list (for "pre-releases") during the period prior to this. Major code revisions may be announced more widely, but these lists are the most reliable way to keep in touch with the status of the package. Patches to fix known problems are also made available via the web site: http://www.net-snmp.org/patches/ How can I find out what other people are doing? ---------------------------------------------- There is a general purpose discussion list net-snmp-users@lists.sourceforge.net To be added to (or removed from) this list, visit http://www.net-snmp.org/lists/net-snmp-users/ Or you can send a message to the address net-snmp-users-request@lists.sourceforge.net with a subject line of 'subscribe' (or 'unsubscribe' as appropriate). To find out what the developers are doing, and to help them out, please read the PORTING file enclosed with the package. There is also a #net-snmp IRC channel set up on the freenode.net chat system. You can connect to this via chat.freenode.net. See http://www.freenode.net/ for more information on getting started with IRC. Several core developers hang out on this channel on a fairly regular basis. How do I submit a patch or bug report? ------------------------------------- The best way to submit a bug report is via the bug database through the interface found at http://www.net-snmp.org/bugs/ Be sure to include the version of the package that you've been working with, the output of the command 'uname -a', the precise configuration or command that triggers the problem and a copy of any output produced. Questions about using the package should be directed at the net-snmp-users@lists.sourceforge.net mailing list. Note that this mailing list is relatively busy, and the people answering these questions are doing so out of the goodness of their hearts, and in addition to their main employment. Please note the following: - use plain text mail, rather than HTML - don't resend questions more than once (even if no-one answered immediately) - include full details of exact commands and error messages ("I've tried everything, and it doesn't work" isn't much use!) - do *NOT* send messages to -users and -coders mailing lists (most developers read both anyway) - don't mail the developers privately - keep everything on the list We can't promise to be able to solve all problems, but we'll certainly try and help. But remember that this is basically an unsupported package. It's Open Source, so if you need something fixing badly enough, fundamentally it's up to you to do the work. All patches should be submitted to the patch manager at http://www.net-snmp.org/patches/ If possible, submit a bug report describing the patch as well (referencing it by its patch number) since the patch manager doesn't contain a decent description field. The best way to submit patch (diff) information is by checking out the current code from the development git trunk, making your changes and then running "git diff" or "git format-patch" after you're done. (Please see http://www.net-snmp.org/wiki/index.php/Git for further information on using git with the Net-SNMP project) If you're working from a source code distribution, and comparing old and new versions of a code file, use "diff -u OLDFILE NEWFILE" Can I reuse the code in my commercial application? ------------------------------------------------- The details of the COPYRIGHTs on the package can be found in the COPYING file. You should have your lawyer read this file if you wish to use the code in your commercial application. We will not summarize here what is in the file, as we're not lawyers and are unqualified to do so. What's the difference between SNMPv1, SNMPv2 and SNMPv3? ------------------------------------------------------- What's the difference between SNMPv2 and SNMPv2c? ------------------------------------------------ A full description is probably beyond the scope of this FAQ. Very briefly, the original protocol and admin framework was described in RFCs 1155-1157, and is now known as SNMPv1. Practical experience showed up various problems and deficiencies with this, and a number of revised frameworks were developed to try and address these problems. Unfortunately, it proved difficult to achieve any sort of agreement - particularly over the details of the administrative framework to use. There was less disagreement over the proposed changes to the protocol operations. These included: * increasing the range of errors that could be reported * introducing "exception values" (so a single missing value didn't affect the other varbinds in the same request) * a new GETBULK operation (a supercharged GETNEXT) * new notification PDUs (closer in structure to the other request PDUs) Strictly speaking, it's this revised protocol (originally defined in RFC 1905, and most recently in RFC 3416) that is "SNMPv2". The only framework based on this protocol that saw a significant level of use was "Community-based SNMPv2" or "SNMPv2c" (defined in RFC 1901). This retained the same administrative framework as SNMPv1 (with all of the accompanying limitations), but using the new protocol operations. More recently, a new administrative framework has been developed, building on the various competing SNMPv2 proposals, and using the same SNMPv2 protocol operations. This is SNMPv3, which is defined in RFCs 3411-3418. It addresses some of the deficiencies of the community-based versions, including significant improvements to the security of SNMP requests (like it finally has some!). SNMPv3 is now a full IETF standard protocol. Strictly speaking, SNMPv3 just defines a fairly abstract framework, based around the idea of "Security Models" and "Access Control Models". It's this combination of SNMPv3 plus accompanying models that actually provides a working SNMP system. However, the only models in common use are the "User-based Security Model" (RFC 3414) and the "View-based Access Control Model" (RFC 3415). So "SNMPv3" is frequently used to mean the combination of the basic SNMPv3 framework with these two particular models. This is also sometimes described as "SNMPv3/USM". So in brief: - SNMPv2c updated the protocol operations but left the administrative framework unchanged. - SNMPv3 updated the administrative framework but left the protocol operations unchanged. Which versions of SNMP are supported in this package? ---------------------------------------------------- This package currently supports the original SNMPv1 (RFC 1157), Community-based SNMPv2 (RFCs 1901-1908), and SNMPv3 (RFCs 3411-3418). The agent will respond to requests using any of these protocols, and all the tools take a command-line option to determine which version to use. Support for SNMPv2 classic (a.k.a. "SNMPv2 historic" - RFCs 1441-1452) was dropped with the 4.0 release of the UCD-snmp package. Can I use SNMPv1 requests with an SNMPv2 MIB (or vice versa)? ------------------------------------------------------------ Yes. The syntax used to specify a MIB file (better referred to as SMIv1 or SMIv2) is purely concerned with how to define the characteristics of various management objects. This is (almost) completely unrelated to the versions of the protocol used to operate on these values. So it is quite reasonable to use SNMPv1 requests on objects defined using SMIv2, or SNMPv2 (or SNMPv3) requests on objects defined using SMIv1. The one exception is objects of syntax Counter64, which are only accessible using SNMPv2 or higher. SNMPv1 requests will either treat such objects as an error, or skip them completely. Note that SMIv1 is effectively obsolete, and all new MIBs should be written using SMIv2. How can I monitor my system with SNMP? ------------------------------------- There are two main methods of using SNMP for monitoring. One is to regularly query the SNMP agent for information of interest, graphing these values and/or saving them for later analysis. That's not really the focus of the Net-SNMP project - our tools are more low-level, single-shot commands. For this sort of high-level management, you're really looking at a management console application (such as Nagios or OpenNMS), or a data logging application (such as RRDtool, or one of its front-ends - MRTG, Cacti, etc). The other approach is to configure the SNMP agent to monitor the relevant information itself, and issue an alert when the values pass suitable limits. See the section ACTIVE MONITORING in the snmpd.conf(5) man page for details. Note that this entry makes no reference as to _what_ you should monitor, or what values might be significant. That's because it is impossible to provide a universal answer to these questions. The information to monitor, and the normal operating values will ultimately depend on your local environment. SNMP is simply a tool to _help_ you manage your systems - it isn't a magic panacea - you still have to think for yourself! Where can I find more information about network management? ---------------------------------------------------------- There are a number of sites with network management information on the World Wide Web. Some of the most useful are http://www.simpleweb.org/ http://www.snmplink.org/ http://www.mibdepot.com/ The SNMP Usenet newsgroup is now mostly defunct, but although the FAQ hasn't been updated for a while, it still contains a large amount of useful information relating to SNMP, including books, software, other sites, how to get an enterprise number, etc, etc. This is available from ftp://rtfm.mit.edu/pub/usenet/comp.protocols.snmp/ or via any of the Web sites above. What ports does SNMP use? ------------------------ There are three main network ports (and one named socket), which are typically used by SNMP. These are: - UDP port 161 - SNMP requests (GET* and SET) - UDP port 162 - SNMP notifications (Traps/Informs) - TCP port 705 - AgentX - /var/agentx/master - AgentX However, these are simply the default "well-known" ports for these purposes, and it is perfectly possible to accept requests on other ports. Is Net-SNMP thread safe? ----------------------- Strictly speaking, no. However, it is possible to use the library within a multi-threaded management application. This is covered in detail in the file README.thread (shipped with the standard distribution), but can be summarised as follows: - Call 'snmp_sess_init()' prior to activating any threads. This reads in and parses MIB information (which isn't thread-safe) as well as preparing a session structure for subsequent use. - Open an SNMP session using 'snmp_sess_open()' which returns an opaque session handle, which is essentially independent of any other sessions (regardless of thread). - Resource locking is not handled within the library, and is the responsibility of the main application. The Net-SNMP agent has not been designed for multi-threaded use. It should be safe to use the agent library to embed a subagent within a threaded application as long as *all* SNMP-related activity (including generating traps, and parsing MIBs) is handled within a single thread. The command-line tools shipped as part of the Net-SNMP distribution are simple single-threaded applications, and are not designed for multi-threaded use. Adapting these to a threaded model is left as an exercise for the student. The same holds true for the notification receiver (snmptrapd). Unfortunately, the SNMPv3 support was added about the same time as the thread support and since they occurred in parallel the SNMPv3 support was never checked for multi-threading correctness. It is most likely that it is not thread-safe at this time. APPLICATIONS ============ How do I add a MIB? ------------------ This is actually two separate questions, depending on whether you are referring to the tools, or the agent (or both). See the next question or the next section respectively. How do I add a MIB to the tools? ------------------------------- Adding a MIB to the client-side tools has two main effects: - it allows you to refer to MIB objects by name (rather than having to use the numeric OIDs) - it allows the results to be displayed in a more immediately meaningful fashion. Not just giving the object names, but also showing named enumeration values, and interpreting table indexes properly (particularly for string and OID index values). There are two steps required to add a new MIB file to the tools. Firstly, copy the MIB file into the appropriate location: cp MY-MIB.txt /usr/local/share/snmp/mibs (which makes it available to everyone on the system) or mkdir $HOME/.snmp mkdir $HOME/.snmp/mibs cp MY-MIB.txt $HOME/.snmp/mibs (which makes it available to you only) Note that the location of the shared MIB directory may be different from that given here - see the FAQ entry "Where should I put my MIB files?" for more information. Secondly, tell the tools to load this MIB: snmpwalk -m +MY-MIB ..... (load it for this command only) or export MIBS=+MY-MIB (load it for this session only) or echo "mibs +MY-MIB" >> $HOME/.snmp/snmp.conf (load it every time) Note that the value for this variable is the name of the MIB module, *not* the name of the MIB file. These are typically the same (apart from the .txt suffix), but if in doubt, check the contents of the file. The value to use is the token immediately before the word DEFINITIONS at the start of the file. Or use the special value "all" to have the tools load all available MIBs (which may slow them down, particularly if you have a large number of MIB files. Note that you need *both* steps. Adding a MIB in this way does *not* mean that the agent will automatically return values from this MIB. The agent needs to be explicitly extended to support the new MIB objects, which typically involves writing new code. See the AGENT section for details. Most of the tools (apart from 'snmptable') will work quite happily without any MIB files at all - although the results won't be displayed in quite the same way. Similarly, the agent doesn't need MIB files either (other than to handle MIB object names in the configuration file). Why can't I see anything from the agent? --------------------------------------- Fundamentally, there are two basic reasons why a request may go unanswered. Either the management application does not like the request (so never sends it), or the agent does not like the request (so never responds). The simplest way to distinguish between the two is to run the command with the command-line option '-d'. If this doesn't display a hex dump of the raw outgoing packet, then it's the client side which is dropping the request. Hopefully you should also see an error message, to help identify what's wrong. If this displays one or more outgoing dumps (but nothing coming back), then the request is failing at the agent end. See the next entry for more details. There are three further possibilities to consider: One is that the agent may return a response to the original query, but the management application may not like this response, and refuse to display it. This is relatively unusual, and typically indicates a flaw with the remote agent. (I hope you're not contemplating the suggestion that the Net-SNMP command-line tools might contain bugs!) The typical symptoms of this would be that the '-d' option would display a sequence of sending and received packet dumps, with the same contents each time. Ask on the mailing list for advice. Alternatively, the agent may simply not support the MIB objects being requested. This is most commonly seen when using the "snmpwalk" tool (particularly with SNMPv1). The symptoms here would be that '-d' would show two pairs of raw packet dumps - one a GETNEXT request (A1 in the sending packet), followed by a GET request (A0). Repeating the same request with the "snmpgetnext" command-line tool should show the information (if any) that the agent returned, which was then discarded by snmpwalk as irrelevant. Note that this is how snmpwalk was designed to work. It is not an error. Finally, it may be that the agent is simply taking too long to respond. The easiest way to test for this is to add the command-line options "-t 60 -r 0", which will send a single request (with no repetitions) and wait for a minute before giving up. This ought to be long enough for all but the most-overloaded agent, or inefficient MIB module! If this turns out to be the cause, then ask on the mailing list for advice on options for improving the performance. Why doesn't the agent respond? ----------------------------- Assuming that the tests outlined in the previous entry indicate that the problem lies with the agent not responding, the obvious question is "why not". Again, there are two basic possibilities - either the agent never sees the request, or it receives it but is unwilling (or unable) to process it. If the remote system is running the Net-SNMP agent, then the easiest way to distinguish between these two cases is to shut down the agent, and re-start it manually using the options -f -Le -d Then send the same query as before. This should display raw dumps of packets seen (or sent) by the agent, just as with the client side in the previous entry. If the agent does not display anything, then it is simply not receiving the requests. This may be because they are being blocked by network or local firewall settings ('iptables -L'), or the agent may not be listening on the expected interfaces ('netstat -a'). This is most commonly encountered when running queries from a remote host, particularly if the same request succeeds when run on the same system as the agent itself. If the agent displays a dump of the incoming request, but nothing going out, then the most likely cause is access control settings. See the relevant entries in the AGENT section for details. Note that if the agent receives an SNMPv1 or SNMPv2c request with a unknown community string, then it will not return an error response - the request is simply discarded. Another possibility is that the request may be rejected by settings in /etc/hosts.{allow,deny}. Again, '-d' will display an incoming packet dump but no corresponding outgoing response. However in this situation, the agent should also log a message that the request is being refused. Running the agent with '-d' can also help identify situations where the agent *is* responding to the request, but only after a long delay. This would be indicated by a series of incoming packet dumps (showing various retries from the client side), followed by several outgoing dumps - possibly long after the client tool has given up in disgust. See the entry The agent worked for a while, then stopped responding. Why? later in this section. I can see the system group, but nothing else. Why? -------------------------------------------------- This is almost definitely due to the access configuration of the agent. Many pre-configured systems (such as most Linux distributions) will only allow access to the system group by default, and need to be configured to enable more general access. The easiest way to test this is to try a GETNEXT request on one of the other standard groups e.g. snmpgetnext ..... interfaces If the agent responds with "hrSystemUptime.0" or "end of MIB", then it is clearly configured in this way. See the entries on access control in the AGENT section for more information. Why can't I see values in the tree? ----------------------------------------------- If you can see most of the standard information (not just the system and hrSystem groups), but not in the vendor-specific 'enterprises' tree, then once again there are several possible causes. Firstly, it's possible that the agent does not implement this particular enterprise tree. Remember that adding a MIB to the client tools does *not* automatically add support for these object to the agent. See the AGENT section for more information. Alternatively, it may be that the agent does implement some or all of this enterprise tree, but the access control settings are configured to block access to it. The simplest way to checks whether the agent implements a given portion of the OID tree is to run snmpwalk .... nsModuleName and look for index values that fall in the area of interest. (Always assuming that you have access to this particular section of the Net-SNMP enterprise tree, of course!) Checking the access control settings can be done by examining the tables vacmAccessTable and vacmViewTreeFamilyTable. Note that these are used to configure access control for *all* versions of SNMP - not just SNMPv3. The third possibility is that simply isn't any information in the specified tree. For example, several of the tables in the UCDavis enterprise tree (such as prTable, extTable, dskTable and fileTable) require explicit configuration in the snmpd.conf file. If you query this particular tables without the necessary configuration entries, then they will be empty. Finally, if you can't see anything from *any* enterprise-specific tree, then this may be down to how you are asking for the information. By default, if "snmpwalk" is run without an explicitly starting OID, then it will display the contents of the 'mib-2' tree, containing most of the IETF-standard management information supported by the agent. When the agent reaches the end of this tree, it will return the first enterprise-specific value, 'snmpwalk' will recognise that this marks the end of the (implicit) requested tree, and stop. No enterprise-specific information will be displayed. To walk the whole tree, and see *all* the information that the agent supports, specify a starting point of '.iso' or '.1'. To walk a specific enterprise subtree, specify the root of this tree as the starting point - e.g: snmpwalk -v1 -c public localhost UCD-SNMP-MIB::ucdavis There is more information about particular UCD-specific subtrees in the AGENT section. The agent worked for a while, then stopped responding. Why? ----------------------------------------------------------- There are three basic possibilities: - the agent has crashed - it is hanging - it is temporarily overloaded Detecting whether the agent has crashed should be fairly straighforward. If you can reliably reproduce this crash (e.g. by sending a particular SNMP request), then contact the coders list for advice. It's the other two cases that are probably more significant. To tell the difference between these two, try leaving the agent undisturbed for a while, and then probe it using a single 'snmpget' request, specifying a longer timeout (e.g. '-t 120'). If it now responds, then something was probably sending requests (including duplicate retries) faster than the agent could process them, and it was building up a backlog. Try adjusting the timeout period and retry frequency of these client requests, or look at improving the efficiency of the implementation of the relevant MIB objects. If the agent remains unresponsive (particularly if the load on the system is steadily climbing), then it's probably hanging, and all you can really do is restart the agent. If you can identify what causes this to happen, then contact the coders list for advice. Requesting an object fails with "Unknown Object Identifier" Why? ---------------------------------------------------------------- If a general snmpwalk shows a particular entry, but asking for it more specifically gives a "sub-identifier not found:" or "Unknown Object Identifier" error, then that's a problem with the tool, rather than the agent. Firstly, make sure that you're asking for the object by the right name. Object descriptors are case-sensitive, so asking for 'sysuptime' will not be recognised, but 'sysUpTime' will. Alternatively, the object may be defined in a MIB that hasn't been loaded. Try loading in all the MIB files: snmpget -m ALL -v1 -c public localhost sysUpTime.0 or specify the name of the appropriate MIB explicitly: snmpget -v1 -c public myhost SNMPv2-MIB::sysUpTime.0 Note that this uses the name of the *module*, not the name of the file. However, if 'snmpwalk' displays the object by name, this is unlikely to be the cause, and you should look closely at the exact object name you are using. In particular, see the next entry. Why do I get "noSuchName" when asking for "sysUpTime" (or similar)? ------------------------------------------------------------------ Assuming that you do have access to this object, the most likely cause is forgetting the instance subidentifier. If you try walking the 'system' group (or any other part of the MIB tree), you should notice that all of the results have a number after the object name. This is the "instance subidentifier" of that particular MIB instance. For values in tables (such as the sysORTable), this acts as an index into the table - a very familiar concept. But *all* SNMP values will display an instance number, whether or not they are part of a table. For non-table objects ("scalars"), this instance subidentifier will always be '0', and it *must* be included when making a GET request. Compare the following: $ snmpget -v1 -c public localhost sysUpTime Error in packet Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: system.sysUpTime $ snmpget -v1 -c public localhost sysUpTime.0 system.sysUpTime.0 = Timeticks: (69189271) 8 days, 0:11:32.71 This is a little less obscure when using SNMPv2c or v3 requests: $ snmpget -v 2c -c public localhost sysUpTime system.sysUpTime = No Such Instance currently exists Why do I sometimes get "End of MIB" when walking a tree, and sometimes not? -------------------------------------------------------------------------- This depends on which MIB modules are supported by the agent you are querying and exactly what you're asking for. Note that a tree is walked by repeatedly asking for "the next entry" until all the values under that tree have been retrieved. However, the agent has no idea that this is what's happening - all it sees is a request for "the next entry after X". If the object X happens to be the last entry in a sub-tree, the agent will provide the next object supported (as requested) even though this will be in a different subtree. It's up to the querying tool to recognise that this last result lies outside the area of interest, and simply discard it. If the object X happens to be the last entry supported by the agent, it doesn't have another object to provide, so returns an "end of MIB" indication. The Net-SNMP tools report this with the message above. But in either case, the actual information provided will be the same. How do I use SNMPv3? ------------------- The simplest form of SNMPv3 request is unauthenticated and unencrypted (noAuthNoPriv). It simply requires a user name, and would look something like: snmpget -v 3 -l noAuthNoPriv -u dave localhost sysUpTime.0 However this approach foregoes the security protection which is the main advantage of using SNMPv3 (and the agent must also be explicitly configured to allow unauthenticated requests from that user). The most common form of SNMPv3 request is authenticated but not encrypted (authNoPriv). This specifies the pass phrase to authenticate with: snmpget -v 3 -l authNoPriv -u dave -A "Open the Door" localhost sysUpTime.0 A fully secure (i.e. encrypted) request (authPriv) would also specify the privacy pass phrase: snmpget -v 3 -l authPriv -u dave -A "Open the Door" -X "Bet you can't see me" localhost sysUpTime.0 In practise, most of these would probably be set via configuration directives in a personal $HOME/.snmp/snmp.conf file (note, *not* the agent's snmpd.conf file). The equivalent settings for the third example would be: defSecurityName dave defSecurityLevel authPriv defAuthPassphrase "Open the Door" defPrivPassphrase "Bet you can't see me" If the AuthPassphrase and the PrivPassphrase are the same, then you can use the single setting defPassphrase "Open the Door and see me" instead. See the AGENT section for how to configure the agent for SNMPv3 access. Why can't I set any variables in the MIB? ---------------------------------------- There are three possible reasons for this: Many MIB objects are defined as "read-only" and inherently cannot be changed via SET requests. Attempts to do so will typically be rejected by the 'snmpset' command without ever being sent to the agent. Of those objects that can in principle be changed, the agent may not include the code necessary to support SET requests. (GET and GETNEXT are much easier to handle - particularly for objects relating to the internals of the underlying operating system). Even if SET support has been implemented, the agent may not be configured to allow write access to this object. Ready-installed distributions (such as those shipped with Linux) tend to be configured with read-only access to part of the mib tree (typically just the system group) and no write access at all. To change this, you will need to set up the agent's access control configuration. See the AGENT section for more details. Note that neither the community string "public" nor "private" can be used to set variables in a typical default configuration. Variables seem to disappear when I try to set them. Why? -------------------------------------------------------- This is actually the same as the previous question - it just isn't particularly obvious, particularly when using SNMPv1. A typical example of this effect would be $ snmpget -v1 -c public localhost sysLocation.0 sysLocation.0 = somewhere nearby $ snmpset -v1 -c public localhost sysLocation.0 s "right here" Error in packet. Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: sysLocation.0 Trying the same request using SNMPv2 or above is somewhat more informative: $ snmpset -v 2c -c public localhost sysLocation.0 s "right here" Error in packet. Reason: notWritable The SNMPv1 error 'noSuchName' actually means: "You can't do that to this variable" rather than "this variable doesn't exist". It may be the case that it doesn't exist at all. It may exist but you don't have access to it (although different administrative credentials might be accepted). Or it may exist, but you simply can't perform that particular operation (e.g. changing it). Similarly, the SNMPv2 error 'notWritable' means "not writable in this particular case" rather than "not writable under any circumstances". If you are sure that the object is both defined as writable, and has been implemented as such, then you probably need to look at the agent access control. See the AGENT section for more details. But see the next entry first. Why can't I change sysLocation (or sysContact)? ---------------------------------------------- There is one final possibility to consider for why a SET request might be rejected. The values for certain MIB objects (including 'sysLocation' and 'sysContact') can be configured via the snmpd.conf file. If this is done, then these particular objects become read-only, and cannot be updated via SET commands, even if the access control settings would otherwise allow it. This may seem perverse, but there is good reason for it. If there is a configuration setting for one of these objects, then that value will be used whenever the agent re-starts. If the object was allowed to be updated using SET, this new value would be forgotten the next time the agent was re-started. Hence the Net-SNMP agent rejects such requests if there's a value configured via the 'snmpd.conf' file. If there isn't such a config setting, then the write request will succeed (assuming suitable access control settings), and the new value will be retained the next time the agent restarts. I get an error when trying to set a negative value - why? -------------------------------------------------------- This is a different problem. What's happening here is that the routine that parses the arguments to the 'snmpset' command is seeing the '-' of the new value, and treating it as a command-line option. This normally generates an error (since digits typically aren't valid command line options). The easiest way to solve this is include the "end-of-option" indicator '--' in the command line, somewhere before the new value (but after all of the options, obviously). For example: snmpset -v 2c -c public localhost -- versionRestartAgent.0 i -1 (This command will still fail, since -1 isn't an acceptable value for this particular object, but that's not the point here!) I get an error when trying to query a string-indexed table value - why? ---------------------------------------------------------------------- The Net-SNMP library will normally try to interpret string-based index values, and display them in a meaningful manner: $ snmpgetnext .... vacmGroupName vacmGroupName.3."dave" = theWorkers The command-line tools will also accept string-valued indexes within an OID, and convert them into the appropriate numeric form before sending an SNMP request. However the Unix shell will typically swallow the quotes around the string index value, before the SNMP tools can get a chance to interpret them. The answer is to escape the quotes, to protect them from the shell, and allow them to be passed through to the OID parser: snmpget .... vacmGroupName.3.\"dave\" or snmpget .... 'vacmGroupName.3."dave"' Another alternative is to avoid trying to specify the index value as a string, and provide the numeric subidentifiers directly: snmpget .... vacmGroupName.3.4.100.97.118.101 (where '3' indicates SNMPv3, '4' is the length of the string index, followed by the ASCII values of the individual characters). The command-line option '-Ob' will display the results of querying a string-indexed table in this format: $ snmpgetnext -Ob .... vacmGroupName vacmGroupName.3.4.100.97.118.101 = theWorkers How should I specify string-indexed table values? ------------------------------------------------ There's one other aspect of string-indexed tables that can cause problems - the difference between implicit- and explicit-length strings, and how to represent these when making an SNMP query. The most common style of string index uses an explicit length, followed by the individual ASCII character values: "dave" = 4.'d'.'a'.'v'.'e' (as shown in the previous entry). However if the string index is defined in the MIB file as IMPLIED (or if it has a fixed length, such as a physical ethernet address), then the length subidentifier is omitted, and the index simply consists of the character values: "dave" = 'd'.'a'.'v'.'e' Note that IMPLIED index objects can only appear as the *last* index for a table. The Net-SNMP library uses double quotes (i.e. "dave) to indicate an explicit length string index value, and single quotes (i.e. 'dave') to indicate an implicit length one. If you use the wrong style of quotes, then the resulting OID will be incorrect, and you'll get confusing results to your query. How do I send traps and notifications? --------------------------------------- Traps and notifications can be sent using the command 'snmptrap'. The following examples generate the generic trap 'warmStart(1)' and a (dummy) enterprise specific trap '99' respectively: snmptrap -v 1 -c public localhost "" "" 1 0 "" snmptrap -v 1 -c public localhost "" "" 6 99 "" The empty parameters "" will use suitable defaults for the relevant values (enterprise OID, address of sender and current sysUptime). An SNMPv2 or SNMPv3 notification (either trap or inform) takes the OID of the trap to send: snmptrap -v 2c -c public localhost "" UCD-SNMP-MIB::ucdStart snmptrap -v 2c -c public localhost "" .1.3.6.1.4.1.2021.251.1 (These two are equivalent ways of specifying the same trap). Again, the empty parameter "" will use a suitable default for the relevant value (sysUptime). Any of these commands can be followed by one or more varbinds, using the same (OID/type/value) syntax as for 'snmpset': snmptrap -v 2c -c public localhost "" ucdStart sysContact.0 s "Dave" Generating traps from within the agent, or other applications, is covered in the AGENT and CODING sections. You should also read the snmptrap tutorial at http://www.net-snmp.org/wiki/index.php/TUT:snmptrap which will help you understand everything you need to know about traps. How do I receive traps and notifications? ---------------------------------------- Handling incoming traps is the job of a "notification receiver". The Net-SNMP suite include the tool 'snmptrapd' to act in this role. This can log traps to a file or via the syslog mechanism, forward them to another notification receiver and/or invoke a specified command whenever a particular notification is received. Logging notifications would be done by starting snmptrapd as: snmptrapd -Ls 7 (log to syslog using 'LOCAL7') or snmptrapd -f -Lo (log to standard output) Invoking a command to process a received notification uses one or more 'traphandle' directives in the configuration file 'snmptrapd.conf'. A typical configuration might look something like: traphandle .1.3.6.1.6.3.1.5.1 /path/to/page_me up traphandle .1.3.6.1.4.1.2021.251.1 /path/to/page_me up traphandle .1.3.6.1.4.1.2021.251.2 /path/to/page_me down traphandle default /path/to/log_it where 'page_me' and 'log_it' are the commands to be run. Forwarding notifications to another receiver would be done using similar 'snmptrapd.conf' directives: forward .1.3.6.1.4.1.8072.4.0.3 10.0.0.1 forward default 10.0.0.2 There's a tutorial with more details on the web site at http://www.net-snmp.org/wiki/index.php/TUT:snmptrap How do I receive SNMPv1 traps? ----------------------------- Directives in the 'snmptrapd.conf' file use the (SNMPv2) snmpTrapOID value to identify individual notifications. This applies to *all* versions of SNMP - including SNMPv1 traps. See the co-existence spec (RFC 2576) for details of mapping SNMPv1 traps to SNMPv2 OIDs. Note that the first traphandle directive in the previous entry uses the OID corresponding to the SNMPv1 'coldStart' trap. Why don't I receive incoming traps? ---------------------------------- Starting with net-snmp 5.3, snmptrapd will no longer automatically accept all incoming traps. It must be configured with authorized SNMPv1/v2c community strings and/or SNMPv3 users. Non-authorized traps/informs will be dropped. Please refer to the snmptrapd.conf(5) manual page for details. My traphandler script doesn't work when run like this - why not? --------------------------------------------------------------- If a traphandler script works fine when run manually from the command line, but fails or generates an error when triggered by an incoming notification, then there are two likely causes. Firstly, the interactive shell environment may not be precisely the same as that for programs executed by the snmptrapd daemon. In particular, it's quite possible that the PATH environmental variable may not include all the additional directories that are commonly set up for a personal login configuration. To avoid this problem (particularly for traphandler shell scripts), it's worth giving the full path to all programs used within the script. Secondly, the snmptrapd daemon may not always recognise the appropriate interpreter to use for a particular trap handler. If this is the case, then you can specify this interpreter explicitly as part of the trap handle directive: traphandle default /usr/bin/perl /usr/local/bin/log_it In this case, it's almost certain that you'll also need to give the full path to the traphandle script (as shown) How can the agent receive traps and notifications? ------------------------------------------------- It can't. The primary purpose of an SNMP agent is to handle requests for information from management applications. In SNMP terminology, it acts as a "command responder". It may also issue traps to report significant events or conditions ("notification generator"). But responding to such notifications is a significantly different role, and this is handled by a separate application ('snmptrapd'). Note that it is perfectly possible (even normal) for both agent and trap receiver to run on the same host. How big can an SNMP request (or reply) be? ----------------------------------------- The protocol definition specifies a "minimum maximum" packet size (484 bytes for UDP), which all systems must support, but does not attempt to define an upper bound for this maximum size. This is left to each individual implementation. The UCD software used a fixed size buffer of 1472 bytes to hold the encoded packet, so all requests and responses had to fit within this. The Net-SNMP releases handle packet buffers rather differently, and are not subject to the same fixed restrictions. How can I monitor my systems (disk, memory, etc)? ------------------------------------------------ In general, the Net-SNMP suite consists of relatively low-level tools, and there is nothing included that is designed for high-level, long-term monitoring of trends in network traffic, disk or memory usage, etc. There are a number of packages available that are designed for this purpose. Two of the most widely used are MRTG (http://www.mrtg.org/) and RRDtool (http://oss.oetiker.ch/rrdtool/). There are also several frontends built on top of RRDtool, including Cacti (http://www.cacti.net/) and Cricket (http://cricket.sourceforge.net/). There are details of how to set up Cricket to monitor some of the UCD extensions at http://www.afn.org/~jam/software/cricket/ We have also set up a page that describes in detail how MRTG can be set up to monitor disk, memory and cpu activity at http://www.net-snmp.org/tutorial-5/mrtg/index.html There is also a web-based network configuration system "Net-Policy", based upon SNMP. This is not strictly connected to the Net-SNMP project, but a number of the core developers are also involved with that system. See http://net-policy.sourceforge.net for more details. Applications complain about entries in your example 'snmp.conf' file. Why? -------------------------------------------------------------------------- There *is* no example 'snmp.conf' shipped with the standard distribution. The configuration file 'EXAMPLE.conf' is designed as a config for the agent, and should be installed as 'snmpd.conf' (note the 'd'). The file 'snmp.conf' is intended for general configuration options, applicable to all applications (via the SNMP library). Rename (or merge) the 'snmp.conf' file to 'snmpd.conf', and this should fix the problem. See the AGENT section or the 'snmpd.conf(5)' man page for more information about what should go in this file. OK, what should I put in snmp.conf? ---------------------------------- This is used to set common configuration values for most of the applications, to avoid having to specify them every time. Examples are the SNMPv3 settings mentioned above, defaults for which MIBs to load and where from (see the second entry in this section), and the default SNMP version, port and (if appropriate) community string to use. Some of these (such as MIB information), might be best put in a shared snmp.conf file (typically /usr/local/share/snmp/snmp.conf or /etc/snmp/snmp.conf) to apply to all users of the system. Others (particularly the SNMPv3 security settings), are more likely to refer to a particular user, and should probably go in a personal snmp.conf file (typically $HOME/.snmp/snmp.conf). See 'snmpget -H' and/or the snmp.conf(5) man page for more details. You can also use the "snmpconf" command to help you generate your snmp.conf configuration file (just run it and answer its questions). How do I specify IPv6 addresses in tools command line arguments? --------------------------------------------------------------- IPv6 addresses pose a particular problem for the Net-SNMP command line tools, which parse host names into pieces. In particular, normally if you specify a simple host name, it assumes you want UDP in IPv4 on port 161. By default, these two commands are actually the same: snmpget 127.0.0.1 sysUpTime.0 snmpget udp:127.0.0.1:161 sysUpTime.0 However, for IPv6 this causes a problem because IPv6 addresses also use a colon to separate addressing parts. Thus you need to enclose the address in square brackets ( [ and ] ). Because most shells use these brackets too, you also likely need to quote it: snmpget 'udp6:[::1]:161' sysUpTime.0 PERL ==== What is the purpose of the Perl SNMP module? ------------------------------------------- Short, comprehensive (but ultimately unhelpful) anwer - to provide a perl interface for SNMP operations. Longer, incomplete (but more useful) answer - there are probably two main uses for the Perl SNMP module. The first is for developing client management applications, using perl to send SNMP requests, and manipulating or displaying the results. As such, this is a straight alternative to various other SNMP toolkits currently available (for both perl and other programming languages). The second is as a means for extending the functionality of the Net-SNMP agent, by implementing new MIB modules. This is an alternative to the other script-based extension mechanisms, but is more tightly bound to the Net-SNMP agent (and hence more efficient), while still avoiding the need to write C code. It is also possible to use the perl SNMP module in the snmpd.conf file, or to process incoming notifications, but the above are probably the two primary uses. Where can I get the Perl SNMP package? ------------------------------------- Joe Marzot's excellent Perl 'SNMP' module, is included in the Net-SNMP source releases. It can be found located in the perl/SNMP subdirectory of the source tree. This is accompanied by a number of Perl modules grouped together under the NetSNMP namespace. The basic SNMP module (though not the NetSNMP additions), can also be found at any Comprehensive Perl Archive Network (CPAN) mirror site, under modules/by-module/SNMP. To find the CPAN site nearest you, please see http://www.cpan.org/SITES.html. These Perl modules need to be used in conjunction with a compatible version of the Net-SNMP library. Consult the README file in the SNMP Perl distribution to find out which version of the library it needs. How do I install the Perl SNMP modules? -------------------------------------- Assuming you have a reasonably new (and properly configured) Perl system, this should be simply: cd perl perl Makefile.PL (press RETURN when prompted for host and community) make make test make install (probably as root) It might be possible to install the basic module using perl -MCPAN -e shell ; "install SNMP" but this has not been reliably tested, and very much relies on having the correct version of the Net-SNMP library. There may also be appropriate pre-compiled versions of the Perl modules available from the Net-SNMP project website, or your O/S vendor. But compiling this fails! Why? ----------------------------- The Perl module tends to delve quite deeply into the internals of the main Net-SNMP library, and so is quite sensitive to changes within the library. It's important to use the correct version of the module, that corresponds to the version of the library you have installed. If you're working with a Net-SNMP source distribution, the appropriate versions of the Perl modules are shipped as part of the source code, but you *must* have run "make install" on the main Net-SNMP distribution *first*. If you're working with a ready-installed version of the library, make sure you obtain a compatible version of the Perl module. Note that the Perl modules will be compiled using the compiler (and compiler settings) used for compiling the original perl binary, *not* those used for compiling the Net-SNMP (or UCD) library. If these are different (e.g. 'gcc' used for one and 'cc' for the other) then this may well cause problems. It's much safer to use a consistent environment for both. This issue is discussed in greater detail in the README.solaris file. Also note that the v5 Net-SNMP suite *must* be configured to provide shared libraries in order for the Perl modules to work correctly. This is not necessary with the v4 UCD-SNMP libraries. Compiling the Perl module works OK, but 'make test' fails. Why? -------------------------------------------------------------- That's difficult to answer in general. Some of the Perl tests are rather picky, so this may simply be some minor inconsistency between your precise setup, and the expectations of the test environment. Check that you are working with the Perl distribution that matches the SNMP libraries (use the 'perl/SNMP' in preference to CPAN), and that you have installed the main libraries successfully (uninstall any old versions if you're having trouble). If all this looks OK, and if most of the tests pass, then it's probably safe to run 'make install' anyway. Probably. Why can't mib2c (or tkmib) locate SNMP.pm? ----------------------------------------- That's probably because the SNMP Perl module hasn't been installed. It's not part of the standard Perl distribution, nor is it included in the default Fedora Linux installation (for example). You'll need to install it yourself. See the second entry in this section. Why can't mib2c (or tkmib) load SNMP.so? --------------------------------------- This is probably the same problem. Either the SNMP module hasn't been installed, or it's the wrong version. See the previous questions. Why can't tkmib locate Tk.pm? ---------------------------- Tk.pm is another Perl package that needs to be installed before tkmib will run. It's also available on Perl CPAN. We suggest using version "Tk800.011" or later. It can be installed by issuing the command: perl -MCPAN -e shell ; "install Tk" Why does your RPM complain about missing Perl modules? ----------------------------------------------------- This has been particularly noted on RedHat 9, complaining about the module "perl(Term::ReadKey)" - even if this is actually present (e.g. having been installed directly from CPAN). In fact, this is not specific to Perl modules - the same issue can potentially arise with other RPM dependencies. The problem is that the RPM mechanism keeps a local database of what software packages have been installed, and checks this for any other features that this RPM requires. If software is installed "manually" rather than via rpm packages, then it will not appear in this database. Attempting to install another RPM that rely on this functionality will then complain about the "missing" package, because the RPM system doesn't know that's it's actually available. The ideal solution is to *always* install software using a consistent mechanism (which may involve building RPMs locally, or looking for a suitable pre-built version). Failing this, it's possible to tell the "rpm" command to ignore such dependencies, and install the package anyway. Try: rpm -i --nodeps {package} In this situation, it's then up to you to make sure that any other necessary packages *are* actually present on the system. I've got a problem with the Net-SNMP module. Can you help? ---------------------------------------------------------- Sorry, despite the similar-sounding name, the Net-SNMP (or Net::SNMP) module is nothing to do with this package, or the NetSNMP modules. Net::SNMP is a "pure-perl" implementation of SNMP support, developed by David Town. The developers of the (C-based) Net-SNMP suite do not have any significant experience in using this particular module, and you'll probably be better off asking for help via CPAN or some other perl-related forum. MIBS ==== Where can I find a MIB compiler? ------------------------------- That depends what you mean by a "MIB compiler". There are at least two types of tool that are commonly referred to by this name. The first is a tool to check MIB files for validity. With the Net-SNMP software, this functionality is mostly integrated within the MIB parser, and hence included in all the applications. The tool 'snmptranslate' is probably the most appropriate for this purpose. Note that the parser is fairly forgiving (see 'What ASN.1 parser is used' below), so this should not be regarded as a stamp of approval. For a more rigourous validation, use a tool such as 'smilint', or the on-line interface at http://wwwsnmp.cs.utwente.nl/ietf/mibs/validate/ The second type of "MIB compiler" is one to turn a MIB specification into C code, specifically one designed to aid agent implementation. The command 'mib2c' is an example of such a tool for the Net-SNMP agent. See the CODING section for more information. Why aren't my MIB files being read in? ------------------------------------- There are two basic likely causes - either the library isn't attemping to load these particular MIB files, or it's trying to load them but can't locate them. By default, the Net-SNMP library loads a specific subset of MIB files. This list is set when the suite is first configured and compiled, and basically corresponds to the list of modules that the agent supports. (This is a simplification, but is a reasonable first approximation). In order to load additional MIB files, it is necessary to add them to this default list. See the FAQ entry "How do I add a MIB to the tools?" for more information about how to do this. Alternatively, the tools may be looking in the wrong place. The directory where the library looks for MIB files is also set when the software is first configured and compiled. If you put new MIB files in the wrong location, then the library won't be able to find them (and will complain). This problem may arise when switching from a vendor-supplied distribution to one compiled from source (or vice versa). See the next entry for more information. Where should I put my MIB files? ------------------------------- If you've compiled the package from source (or are using binaries from the project website), then you should probably put new MIB files in the directory /usr/local/share/snmp/mibs If you are using vendor-supplied binaries, then the MIB files may well be located somewhere else (e.g. /usr/share/snmp/mibs, /opt/snmp/mibs, or /etc/sma/snmp/mibs). Have a look for where existing MIB files are installed, and try adding your MIBs to the same directory. If you compiled the source yourself, but specified a different --prefix value when running configure, then the location of the MIB directory will be {prefix}/share/snmp/mibs. If you're still not sure where to put your MIB files, try running the command snmpget -Dparse-mibs 2>&1 | grep directory This will display the location(s) where the library is looking for MIB files. What does "Cannot find module (XXX-MIB)" mean? --------------------------------------------- If this error is only generated for one or two modules, then it's likely that the named modules are not being found - perhaps they're not installed in the correct location, are not readable, or the name being used is incorrect. See the previous entries and the entry "How do I add a MIB to the tools?" for more details. Note that the name reported is the name of the MIB *module*, which is not necessarily the same as the name of the file. If there are a large number of such errors, then it's more likely that either the MIB files haven't been installed at all. If you are compiling from source, then it is necessary to run "make install" in order to set up the full run-time environment. Otherwise, see the previous entry to check whether the MIBs are installed in the correct location for the tools to find them. I'm getting answers, but they're all numbers. Why? ------------------------------------------------- This is related to the previous questions. Remember, the results that you receive from an agent do not depend on which MIBs are loaded by the client tools - purely on how the agent was compiled and configured. Because the tools don't necessarily read in every MIB file they can find (and the relevant MIB file may not be available anyway), it is quite possible for results from an agent to refer to modules that have not been loaded (particularly with GETNEXT requests, or when walking a tree). The results will be reported correctly, but won't be translated to use named identifiers (or display the values in the most appropriate manner). To fix this, add the missing MIB files to the list of MIBs to be loaded. See the previous entries and the entry "How do I add a MIB to the tools?" for more information. What does "unlinked OID" mean? ----------------------------- This means that the library has been able to find the MIB module, and parse the individual objects defined in it, but is having problems linking them together into a consistent tree. In particular, it can't find an object corresponding to the name within the braces (i.e. the 'xxx' in '{xxx 99}'). This is probably due either to a typo in this name (remember that names are case sensitive, so a reference to 'xxx' will *not* match a definition of 'Xxx'), or else the name is defined in another MIB file, and this dependency is missing from the IMPORT clause of this MIB file. The parser doesn't handle comments properly. Why not? ---------------------------------------------------- The way that comments are handled in a MIB file is subtly different to the equivalent syntax in most typical programming languages, and this difference can catch out the unwary. In particular, there are two common situations which can lead to problems. The first scenario is where the MIB designer has attempted to "comment out" an unwanted line that already contains a comment: -- broken ::= { myMIB 1 } -- This isn't working yet The assumption here is that a comment continues to the end of the line. Unfortunately, this is not correct. A comment will continue either to the end of the line, *or* the next occurance of a pair of dashes. Thus in this case, the definition of "broken" is commented out (as intended) but the following text ("This isn't working yet") is treated as an active part of the MIB, and will generate an error. The second scenario is where a line of dashes has been used to mark out separate parts of a MIB file. Depending on the exact number of dashes used, this may still result in a syntactically valid MIB file, but has a 1-in-4 possibility of triggering an error. This means that this particular situation can be particularly difficult to spot! Most of the Net-SNMP applications have a command-line option (-Pc) which will work around this problem by treating the whole line as a comment. But this is not strictly legal, and the offending MIB file should really be corrected. How can I get more information about problems with MIB files? ------------------------------------------------------------ The command 'snmptranslate' is used to translate between numeric and symbolic forms of OIDs. It uses the same MIB parsing routines as the commands that actually communicate with a network management agent, but can be used standalone. As such, it is a useful tool for identifying problems with reading in MIB files. In particular, the following options may be useful in identifying problems: -Pw warns about conflicting symbols -PW prints more verbose warnings about other problems as well (in both cases, ignore the 'xmalloc' reports) -T provides sub-options for various views of these entries There are other '-P' options to control various aspects of MIB parsing. See the 'snmptranslate(1)' and 'snmpcmd(1)' man pages for more details, or the tutorial at http://www.net-snmp.org/tutorial-5/commands/snmptranslate.html For a more rigourous validation, use a tool such as 'smilint', or the on-line interface at http://wwwsnmp.cs.utwente.nl/ietf/mibs/validate/ What's this about "too many imported symbols"? --------------------------------------------- Any MIB file starts with an (optional) list of identifiers that it "imports" from other files. The parser handles this using a fixed size buffer to hold the import information. There are two circumstances in which this can result in the error message shown above. Firstly, if the MIB file refers to an unusually large number of external identifiers. Handling this case requires a (trivial) patch to the parsing code. Contact the coders list for advice. (This is extremely rare - the only example that we've come across is the Cabletron Trap MIB). Much more common is a syntax error in the IMPORTS clause of the MIB file in question. In particular, check that this section ends in a semicolon, before going on to the main MIB object definitions. Do I actually need the MIB files? -------------------------------- Probably not. The MIB files play two main roles - they are used to translate between numeric OIDs and the corresponding textual names, and they define the structure and syntax of the relevant MIB objects. This second role is perhaps best thought of in terms of a design document. It's vital while developing an application (typically the MIB module or handler within the agent), since it defines what the application (MIB) must actually do. But once the code has been written, the design document becomes redundent. The agent then has the same information hardcoded into it (literally!), and no longer needs the MIB file. The translation task is not strictly necessary - SNMP will operate fine without any MIB files at all, as long as you're happy to work with numeric OIDs throughout, and know which MIB objects you're interested in. But it's much easier to work with the (hopefully) meaningful names, enumeration tags and the like, and to view the description of a particular object. This requires having the relevant MIB files installed and loaded. Since the agent needs MIBs the least and some systems are memory restricted, it is possible to completely disable loading these MIBs as well as remove the code that does the parsing by using the --disable-mib-loading flag to configure. However, note that certain snmpd.conf tokens actually make use of mib information so they won't be as easily usable. AGENT ===== What MIBs are supported? ----------------------- The following MIBs are supported (at least in part and on some systems): - MIB-2 General network statistics (RFC 1213 and subsequent revisions) - Host Resources (RFC 1514 and 2790) - SNMPv3 framework (RFCs 2571-5, 3411-3418) (including USM, VACM, Target and Notification MIBs) - DisMan Event and Schedule MIBs - MTA-MIB (sendmail) - private UCD/Net-SNMP agent extensions (monitor specified processes and disks, memory, CPU, load average, + extending the agent using shell commands) See README.agent-mibs for details. Not all MIB modules are included by default on all systems. Some of these may need to be explicitly requested when the software is first configured and built, while others may not be available on all architectures. There are a few other MIB implementations distributed as part of the source tarball, but these are basically unsupported and most of the core developers have little or no experience with using them. What protocols are supported? ---------------------------- The agent supports all three current versions of SNMP (v1, v2c and v3), over both UDP and TCP transports, as well as acting as a SMUX (RFC 1227) master agent, AgentX (RFC 2741) in both master and subagent roles, and SNMP proxying. How do I configure the agent? ---------------------------- That's a somewhat ambiguous question, as there are two very different stages where it is possible to "configure" the agent. Firstly, you can determine what capabilities and defaults are included within the library and agent, at the time that the software is first built. This uses suitable flags to the 'configure' script, before compiling the source. As far as the agent is concerned, the most significant option is '--with-mib-modules' (or '--with-out-mib-modules') to control which MIBs will be supported by the agent. See the next few entries for details. You can also control various aspects of the agent behaviour (and the information it returns) at run time, via the 'snmpd.conf' configuration file. Various aspects of this are touched on throughout this FAQ. Or see the snmpd.conf(5) manual page for full details. The "snmpconf" script can help in creating this config file. Start off with 'snmpconf -g basic_setup' to get you going. How do I remove a MIB from the agent? ------------------------------------ Deleting the text file for a MIB does not affect the agent (other than to prevent it from recognising MIB object names in the config files). It's necessary to tell the agent not to activate the relevant code that actually implements these objects. There are three ways to do this: 1) re-run 'configure' to exclude the given MIB module(s) from the build configuration, then recompile and reinstall: ./configure --with-out-mib-modules=path/to/unwanted .... make make install This specifies the path to the module code file, relative to the 'agent/mibgroup' directory. Clearly, this approach is only possible if you are working with a source distribution. 2) disable the MIB at runtime snmpd -I -unwanted Note that this relies on knowing which modules are used to implement the relevant MIB objects. If you're not sure, you could try walking the 'nsModuleName' MIB object, which indicates the module responsible for each particular range of OIDs. You can also check which MIB modules are loaded by getting the agent to report them as they are initialised: snmpd -Dmib_init -H From this information, it should then be fairly obvious which modules to disable. 3) use access control to exclude the mib from the view used to query the agent: view almostEverything included .1 view almostEverything excluded unwantedMib rocommunity public default -V almostEverything This approach can also be used with the full com2sec/group/access configuration directives (e.g. with versions earlier than 5.3, which don't support the above mechanism). I've installed a new MIB file. Why can't I query it? ---------------------------------------------------- Installing a new MIB file will not magically enable the agent to know what values to report for the objects defined in that MIB. It's necessary to have some code which can provide the relevant information. The next few entries, and the CODING section address this issue in more detail. How do I add a MIB to the agent? ------------------------------- Adding a MIB essentially involves writing some code to implement the objects defined in the new MIB. There are three basic approaches that can be used to do this: - The agent can invoke an external command or shell script to return the necessary information. There are several possible variations on this approach - see the next entry for details. - The agent can pass the request off to another (sub-)agent, which already implements the required MIB. Again, there are several ways of doing this - including AgentX, SMUX and proxied SNMP. See the next entry but one for details. - You can write code to implement the new MIB objects, and include this within the agent. This is most commonly C (or C++) code, although the agent can also support MIB modules implemented in perl. See the next section (CODING) for more details. Note that there is no visible difference between external commands, subagents, and modules implemented within the main agent itself. Tools querying the agent will see a single MIB structure. What's the difference between 'exec', 'sh', 'extend' and 'pass'? --------------------------------------------------------------- 'exec' will run the specified command and return the exit status and output. Any arguments are passed directly to the command, with no special interpretation. 'sh' is similar, but invokes a shell to run the command line given. This means that quoted arguments will be recognised as such, and also allows redirection, and other similar shell interpretation. The results are returned in exactly the same way. 'extend' is also similar, but provides a richer and more flexible MIB framework - both for configuring the exact command to be run, and for displaying the results. None of these mechanisms require the command to have any knowledge of SNMP, or the fact that they are being used in this manner. But the output is returned in a fixed format, and it is up to the receiving application to interpret this appropriately. Note that the "relocatable" form of the 'exec' directive ('exec OID ....') produces MIB output that is not strictly valid. For this reason, support for this has been deprecated in favour of 'extend OID ...', which produces well-formed MIB results (as well as providing fuller functionality). The most recent releases of the agent don't include support for "relocatable exec" by default. This needs to be explicitly included when the agent is first compiled, by including the module 'ucd-snmp/extensible' instead of 'agent/extend'. 'pass' is a more general mechanism for implementing arbitrary MIB objects. The specified command will be invoked for any request within the named MIB subtree, and passed details of the requested OID. It should return the information relevant to the requested OID. 'pass-persist' is similar, but the command will continue running even after the initial request has been answered. These two mechanisms can be used to implement a particular MIB, following the correct MIB structure (as opposed to the fixed format of exec/sh/extend). All of these mechanisms are described in the 'snmpd.conf(5)' man page, in the section entitled "Extending Agent Functionality". What's the difference between AgentX, SMUX and proxied SNMP? ----------------------------------------------------------- All three are protocols that can be used to make two or more agents appear as one to the querying application. In each case, one agent takes the role of "master", and delegates requests to one of the others as and where this is appropriate. The differences between them mainly relate to how data is represented, and the mechanisms for communication between master and subagents. SMUX and proxy SNMP both essentially use the standard SNMP packet format. The main difference is that a proxy SNMP subagent need not be aware that it is acting in such a role. It typically listens on a non-standard port, and simply receives requests as usual, forwarded from the master agent (rather than directly). The main issue to be aware of is that such requests will appear to come from the local host, and this may affect how the access control mechanisms need to be set up. SMUX uses a similar packet format, but the subagent "registers" with the master agent, providing a suitable password. The Net-SNMP (and UCD) agent includes the possibility of acting as a SMUX master agent, but the suite does not include a subagent API. Note that support for SMUX is not included by default, and needs to be explicitly enabled by running: --with-mib-modules=smux before re-compiling the agent. See the file 'agent/mibgroup/README.smux' for details. AgentX uses a more compact (and simpler) packet format, with a richer range of administrative commands, and provides a more flexible and reliable extension mechanism. The Net-SNMP agent can be used in both master and subagent roles, and the agent library can also be used to embed an AgentX subagent within another application. See the file 'README.agentx' for details. AgentX support is included by default, but needs to be explicitly activated in the master agent. Do this by adding the line master agentx to the snmpd.conf file before starting the agent. What is the purpose of 'dlmod'? ------------------------------ Most of the MIB information supplied by the Net-SNMP agent is provided by C-coded implementation modules, and the choice of which modules to include is usually made when the agent is first built. Adding new MIB modules would therefore require re-compiling the agent. This is not always convenient - particularly when working with a production system, and/or pre-installed binaries. Dynamically loaded modules are a means of including a MIB implementation module within the main SNMP agent (or an AgentX subagent) without needing to re-compile and re-link the agent binary. Instead, details of the module(s) to load are specified in the configuration file, and the agent locates the files listed, and merges them in at run time. See http://www.net-snmp.org/tutorial-5/toolkit/dlmod/ for more information. Which extension mechanism should I use? -------------------------------------- That's not easy to answer in general. If there's an existing agent that already implements the desired new MIB, then it makes sense to re-use that, via whatever extension protocol that agent might support. Note that the SMUX protocol has essentially been superceded by AgentX, which provides a fuller and more reliable mechanism than either SMUX or proxied SNMP. So ideally, this would be the preferred extension approach. But if the target subagent only supports SMUX or basic SNMP, then that would dictate the extension protocol to use. Implementing the module in C within the main agent (directly or via dlmod) is probably the most efficient and reliable, closely followed by embedded perl (or python) extensions. These have the advantage of minimal overheads between the code implementing the MIB module, and the agent framework, and no inter-process communication issues. But this does assume that there's a suitable mechanism for retrieving the necessary information. If the new MIB is monitoring or managing some other subsystem, external to the agent, then it may be necessary to embed a subagent within the subsystem itself - particularly if there's no suitable public API to retrieve the necessary information. In this case, AgentX is probably the most appropriate way forward. Alternatively, you could implement the missing public management API for that subsystem, and develop a module within the main agent instead. Can I use AgentX when running under Windows? ------------------------------------------- Yes, but there are a couple of things to be aware of. Firstly, by default the AgentX master listens on the Unix domain socket '/var/agentx/master', which doesn't work under Windows. You'll need to tell it to listen on a TCP port, either by using the command-line option "-x localhost:705", or by adding the directive "agentxSocket localhost:705" to the snmpd.conf file. Secondly, be aware that the security of AgentX connectivity is not particularly strong. The examples given here would allow any process running on the local machine to register as an AgentX subagent. The more obvious settings "-x 705" or "agentxSocket 705" would allow a system *anywhere* on the network (or even from remote networks) to register as an AgentX subagent. This could potentially be used to hijack the agent, or provide false information. How can I run AgentX with a different socket address? ---------------------------------------------------- There are two sides to an AgentX connection, and they need to agree about which socket address to use. So if you want to use a different socket, you need to configure both parties accordingly. The socket that the Net-SNMP master agent uses to listen for AgentX registrations (and send appropriate requests) can be specified using the option '-x'. The command "snmpd -x tcp:localhost:705 ...." would start the agent listening on the TCP port 705 for connections from the local system. The same effect can also be obtained by adding the line agentxsocket localhost:705 to the file 'snmpd.conf'. The same option can be used with the Net-SNMP agent when running in This also holds when the Net-SNMP agent is running in "subagent" mode, to specify the socket to register with (and receive requests from). So a subagent might connect to the master agent above (both running on the same host), using: "snmpd -X -x tcp:localhost:705 ...." A subagent running embedded within some other application will typically not understand the same command-line options, so would need to set the same configuration programmatically: netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, "tcp:localhost:705"); With the example subagent code from the Net-SNMP tutorial, this line would be added immediately before the 'init_agent' call. The same approach can also be used to listen on a different named socket, using: agentxsocket /tmp/agentx agentxperms 770 770 myuser mygroup or snmpd -x /tmp/agentx .... or netsnmp_ds_set_string(NETSNMP_DS_APPLICATION_ID, NETSNMP_DS_AGENT_X_SOCKET, "/tmp/agentx"); as appropriate. How can I turn off SMUX support? ------------------------------- Normally, you would use the command-line option '-I -{module}' to disable the initialisation of a particular MIB module within the agent. Unfortunately, it's not currently possible to turn off SMUX support this way. The safest approach is to run configure --with-out-mib-modules=smux and recompile the agent. If this is not possible, an alternative workaround might be to have the agent bind the SMUX socket to an invalid IP address, using a snmpd.conf line such as: smuxsocket 1.0.0.0 The agent may complain at startup, but it won't accept any incoming SMUX requests. If the agent complains about not recognising the "smuxsocket" token, then you're out of luck. You'll either have to recompile from source, or use local firewall rules to block connections to port 199. How can I combine two copies of the 'mib2' tree from separate subagents? ----------------------------------------------------------------------- This is the purpose of the SNMPv3 'context' field. Register the MIB module a second time in a non-default context (see the relevant entry in the CODING section for details), and specify this context when querying the agent. The MIB module can use this context information to determine which set of information to report. Or you could register two completely different handlers for the same OID (using different contexts), and the agent will invoke the appropriate code. This holds for both MIB modules implemented within the main agent, or AgentX subagents - the same approach will work for both. Contexts can also be used with proxied SNMP requests - just specify the option '-Cn {context}' as part of the "proxy" entry. See the 'snmpd.conf(5)' man page for details. It's currently not possible to support parallel MIB trees when using SNMPv1 or SNMPv2c. In principle, it should be possible to use the community string in a similar way, but this has not (yet) been implemented. This mechanism is only available with the v5 Net-SNMP agent. The v4 UCD agent does not support contexts at all. Sorry about that. Another way to handle this would be to tweak one of the subagents to use a different set of (non-standard) OID assignments - perhaps by relocating the whole of the subtree to another (private) OID. This is not ideal, but should work with all configurations. What traps are sent by the agent? -------------------------------- The Net-SNMP agent sends a 'coldStart(0)' trap when it first starts up, and an enterprise-specific trap 'nsNotifyShutdown' when it stops. It generates an enterprise-specific trap 'nsNotifyRestart' (rather than the standard 'coldStart(0)' or 'warmStart(1)' traps) on receiving a HUP signal - typically after being re-configured. It can also be configured to send an 'authenticationFailure(4)' trap when it receives an SNMPv1 (or SNMPv2c) request using an unknown community name. The agent does not send 'linkUp' or 'linkDown' traps by default. It can be configured to do this using the directive 'linkUpDownNotifications'. See the 'snmpd.conf(5)' man page (under ACTIVE MONITORING) for details. Similarly, it does not generate traps by default when one of the monitored characteristics (disk usage, running processes, etc) enters or leaves an error state. This can be configured using the 'defaultMonitors' directive (again documented under ACTIVE MONITORING). Where are these traps sent to? ----------------------------- With all these alerts, the agent needs to be told where to send them, specifying the type of notification (v1 or v2 trap, or v2 inform) and the community name to use. This uses the snmpd.conf directives 'trapsink', 'trap2sink' and 'informsink' for the destination type, and 'trapcommunity' for the community name. SNMPv3 destinations can be configured using the directive 'trapsess'. See the 'snmpd.conf(5)' man page for details. Note that the type of trap generated is totally determined by these directives - irrespective of which API call was used to trigger sending the trap. See the trap-related entries in the CODING section for details. Note also that you typically only want *one* of the settings: trapsink localhost trap2sink localhost informsink localhost Including two (or all three) of these lines in the snmpd.conf file will will result in multiple copies of every notifications being sent for each call to 'send_easy_trap()' (or 'send_v2trap()'). This is probably not what was intended! How can I send a particular trap to selected destinations? ---------------------------------------------------------- This is not currently possible. All notifications will be sent to all configured destinations. The agent does not (currently) support notification filtering. There is a preliminary implementation of the snmpNotifyFilterTable which is designed to allow this sort of selective trap direction. However this is not currently active. (The tables are present and can be manipulated and updated, but the information is not consulted) Documentation on how to use this mechanism will appear once the functionality is working properly. When I run the agent it runs and then quits without staying around. Why? ----------------------------------------------------------------------- Firstly, are you certain that this is what is happening? The normal operation of the agent is to 'fork' itself into the background, detaching itself from the controlling terminal so that it will continue running even when you log out, and freeing the command line for subsequent use. This looks at first sight as if the agent has died, but using 'ps' to show all processes should reveal that the agent is still running. To prevent this behaviour (such as when attempting to debug the agent), you can start it with the '-f' flag. This suppresses the fork, and the agent will run as a 'normal' command. It's also often useful to use the '-Le' (or '-L') flag, to log messages to stderr. On the other hand, if 'ps' shows that the agent is not running, then this is an error, and probably show that something went wrong in starting the agent up. Check the agent log file for any error messages, or run it with '-f -Le' and see what it reports. One possible cause might be an existing agent (or some other process) that's already listening on the SNMP port. Trying to start a second agent will fail with an error about "opening the specified endpoint". If you're starting the agent as a non-root user, then this may also fail with the very same error. By default, the agent (and trap handler) will attempt to listen on the standard SNMP port 161 (or 162 for the trap handler). These are defined as "privileged ports", and processes will need to be running as root in order to open them. One way to tackle this is to start the agent as root, but use the -u option to switch to run as another user once the port has been opened. Alternatively, you can specify a different port to use instead. Anything greater than 1024 is available to non-root users. In this case, you'll also need to specify the same port when issuing client commands. After a while the agent stops responding, and starts eating CPU time. Why? -------------------------------------------------------------------------- This is basically the same problem described in the APPLICATIONS section, in the entry The agent worked for a while, then stopped responding. Why? See that entry for details. How can I stop other people getting at my agent? ----------------------------------------------- Firstly, are you concerned with read access or write access? As far as changing things on the agent is concerned, there is relatively little that can actually be altered (see the entry "Why can't I set any variables in the MIB?" above). If you are using the example config file, this is set up to allow read access from your local network, and write access only from the system itself (accessed as 'localhost'), both using the community name specified. You will need to set appropriate values for both NETWORK and COMMUNITY in this file before using it. This mechanism can also be used to control access much more precisely. (see the next few questions for details) Other options include: - Blocking access to port 161 from outside your organisation (using filters on network routers) - Using kernel-level network filtering on the system itself (such as IPTables) - Configuring TCP wrapper support ("--with-libwrap") This uses the TCP 'libwrap' library (available separately) to allow/deny access via /etc/hosts.{allow,deny} For strict security you should use only SNMPv3, which is the secure form of the protocol. However, note that the agent access control mechanisms does not restrict SNMPv3 traffic by location - an SNMPv3 request will be accepted or rejected based purely on the user authentication, irrespective of where it originated. Source-based restrictions on SNMPv3 requests would need to use one of the "external" mechanisms listed above. How can I listen on just one particular interface? ------------------------------------------------- Normally, the agent will bind to the specified port on all interfaces on the system, and accept requests received from any of them. However, if a particular port (or ports) is specified when the agent is first started, then it will only listen for requests on these particular ports. For example: snmpd 127.0.0.1:161 would listen (on the standard port) on the loopback interface only, and: snmpd 10.0.0.1:6161 would listen on port 6161, on the (internal network) interface with address 10.0.0.1. To listen on both of these interfaces (and no others) provide a list of all the desired addresses: snmpd 127.0.0.1:161 127.0.0.1:6161 The AgentX port option ('-x') works in much the same way. The agent is complaining about 'snmpd.conf'. Where is this? ----------------------------------------------------------- It doesn't exist in the distribution as shipped. You need to create it to reflect your local requirement. To get started, you can either just create this file manually, or run snmpconf to help you create one. At the very least, you will need some form of access control configuration, if the agent is to be of any use whatsoever. This can be as simple as: rocommunity public See the snmpd.conf(5) manual page or relevant entries in this FAQ for further details. Why does the agent complain about 'no access control information'? ----------------------------------------------------------------- Although an SNMP agent may support a wide range of management information, it is not necessarily appropriate to report the whole of this to every SNMP management station who asks for it. Some information may be sensitive, and should restricted to authorized administrators only. SNMP therefore includes mechanisms for controlling who has access to what information - both in terms of what can be seen, and (even more importantly) what can be changed. By default, the Net-SNMP agent starts up with a completely empty access control configuration. This means that *no* SNMP request would be successful. It is necessary to explicitly configure suitable access control settings, based on who should be granted access in that particular environment. If there are no access control entries configured (perhaps because no snmpd.conf configuration file has been loaded, or it contains no access control settings), then the agent will not respond to any SNMP requests whatsoever. This is almost certainly not what was intended, so the agent reports this situation. See the next entry for how to configure access control settings. How do I configure access control? --------------------------------- The simplest way is to use the configure directives: rocommunity public (for SNMPv1/2c) rwcommunity private or rouser user1 (for SNMPv3) rwuser user2 These specify the community names or security names to accept for read-only and read-write access to the whole of the supported MIB tree. (Obviously you should change these names to match your requirements - which is a particularly good idea in the case of 'rwcommunity'!) Note that you should *not* specify the same community name for both rocommunity and rwcommunity directives. The rwcommunity setting automatically provides read access, and having both lines (with the same community name) may result in unexpected behaviour. Only use both settings when specifying *different* community names. The same holds true for rouser and rwuser. The two community directives can be restricted to only allow requests from particular sources, and all four can be restricted to a particular subtrees or (from v5.3) a named view. See 'snmpd.conf(5)' for details. How do I configure SNMPv3 users? ------------------------------- There are three ways to configure SNMPv3 users: 1) Stop the agent, and add the line createUser {myUser} MD5 {myPassword} DES to the file /var/net-snmp/snmpd.conf (where {myUser} and {myPassword} are the appropriate values for username and password, _without_ the braces!). Then re-start the snmpd agent. 2) Stop the agent, run the command net-snmp-config --create-snmpv3-user and follow the prompts given. This will create an entry in the /var/net-snmp/snmpd.conf file similar to the above. Then re-start the snmpd agent. 3) Make sure the agent is running, and will respond to an SNMPv3 request (using an existing user with the desired authentication and privacy protocols). Then use the 'snmpusm' command to clone this template user, and change the password. See the access control entries above and the file 'README.snmpv3' for more details about how to use SNMPv3 users, Note that simply having a 'rouser' or 'rwuser' line does *not* automatically create the corresponding SNMPv3 user. You will need the above 'createUser' line (or an equivalent 'usmUser') as well. The 'createUser' line disappears when I start the agent. Why? ------------------------------------------------------------- This is deliberate. The agent removes the (human-readable) 'createUser' directive, and replaces it with an equivalent 'usmUser' entry. This contains the same information, but in a form that's only meaningful internally. Not only is the passphrase no longer visible in the config file, it has actually been converted to a key that is only valid on this particular system. If someone stole the configuration file, they could not use the information from the usmUser entry to access any of your other agents (even if the usernames and passwords were the same). What's the difference between /var/net-snmp and /usr/local/share/snmp? --------------------------------------------------------------------- The /var/net-snmp location is primarily used for information set during the running of the agent, which needs to be persistent between one run of the agent and the next. Apart from "createUser" (see the previous entry), you shouldn't need to touch this file. All other user-provided configuration should go in the traditional location (typically /usr/local/share/snmp/snmpd.conf or /etc/snmp). My new agent is ignoring the old snmpd.conf file. Why? ----------------------------------------------------- The most likely explanation is that the new version of the agent is looking in a different location than the previous one. This is commonly experienced when replacing a ready-installed version (e.g. from a vendor distribution), with the current release installed from the source. Try moving the old config file to the new location, and restart the agent. If you're not sure where this should go, see the next entry. Where should the snmpd.conf file go? ----------------------------------- The default location for this file with the basic distribution is /usr/local/share/snmp/snmpd.conf (or PREFIX/share/snmp/snmpd.conf). Ready-installed versions often look for the file as /etc/snmpd.conf, or /etc/snmp/snmpd.conf. If you are still not sure, try running the command snmpd -f -Le -Dread_config 2>&1 | grep "config path" The first line of output will display the list of locations where the agent is looking for configuration information. Why am I getting "Connection refused"? ------------------------------------- This is actually nothing to do with the access control mechanism (though that's an understandable mistake). This is the result of the TCP wrapper mechanism using the files 'hosts.allow' and 'hosts.deny' to control access to the service. Some distributions may come with this enabled automatically - otherwise you need to explicitly activate this by running configure --with-libwrap and recompiling the agent. If TCP wrappers are enabled, and both hosts.allow and hosts.deny are empty, then all requests will be rejected (with "Connection refused"). The simplest way to avoid this problem and allow incoming requests is to add the line snmpd: ALL to the file /etc/hosts.allow. Be aware that doing this removes one level of protection and allows anyone to try and query your agent. The agent's own access control mechanisms can still be used to restrict what - if anything - they can see. If you do wish to use the TCP wrappers to restrict access, it's sensible to have an explicit entry: snmpd: ALL in the file /etc/hosts.deny, which makes it crystal clear that access to the SNMP agent has been denied. This mechanism can also be used to restrict access to specific management hosts, using a hosts.deny entry such as: snmpd: ALL EXCEPT 127. which will allow connections from localhost, and nothing else. Note that personal firewalls, such as the Linux iptables mechanism, may have a similar effect (though typically this won't be logged). See the earlier entry Requests always seem to timeout, and don't give me anything back. Why? Why can't I see values in the UCDavis 'proc' or 'disk' trees? ------------------------------------------------------------------ Both these trees are designed to report precisely those things that have been explicitly configured for monitoring. If there are no relevant configuration entries in the snmpd.conf file, then these tables will be empty. See the snmpd.conf manual page and the EXAMPLE.conf file for details on configuring the agent. Optionally, run snmpconf -g monitoring to help you set up this section of the snmpd.conf file. Why can't I see values in the UCDavis 'memory' or 'vmstat' trees? ---------------------------------------------------------------- These trees do not need any explicit configuration, and should be present automatically. However the C code necessary to implement these particular MIB modules are not supported on all operating systems. These trees will be omitted on any system for which there is no underlying code. Currently, they are only supported on Linux, HP-UX (memory only), Solaris, BSDi (vmstat on BSDi4 only), Dynix, FreeBSD, NetBSD and OpenBSD. If you want to help port it to other systems, let us know. Note that these subtrees only report the current usage when explicitly queried. They do *not* automatically generate traps when the usage strays outside the configured bounds. See the earlier FAQ entry What traps are sent by the agent? or the snmpd.conf section on active monitoring, for more information. What do the CPU statistics mean - is this the load average? ---------------------------------------------------------- No. Unfortunately, the original definition of the various CPU statistics was a little vague. It referred to a "percentage", without specifying what period this should be calculated over. It was therefore implemented slightly differently on different architectures. The 5.4 release has clarified the situation, and standardised on calculating these percentages over a minute. The relevant MIB descriptions have been updated to make the desired behaviour more explicit. The Net-SNMP agent also includes "raw counters", which can be used to calculate the percentage usage over any desired period. This is the "right" way to handle things in the SNMP model. The original percentage objects have been deprecated, and may possibly be removed in a future release of the agent. Note that this is different from the Unix load average, which is available via the loadTable, and is supported on all architectures. How do I get percentage CPU utilization using ssCpuRawIdle? ----------------------------------------------------------- This one of the "raw counters" mentioned in the previous entry. You need to take two readings of this object and look at the difference between them. That difference divided by the total number of 'ticks' between the two readings (where one tick is probably 0.01 seconds) will give you the percentage utilization over that period. What about multi-processor systems? ---------------------------------- The CPU objects (both percentages and raw counters) were designed to monitor the overall CPU activity of a system, and typically reflect whatever the underlying operating system reports for the (single) CPU statistics information. How these are handled for a multi-CPU system will differ from one O/S to another, and will need to be investigated for each system individually. The htProcessorTable was designed to handle monitoring multi-CPU machines, but the Net-SNMP implementation has up to now treated most systems (with the honourable exception of Solaris, and more recently Linux) as implicitly single-CPU. With the 5.4 release, there is now a cleaner framework for reporting on multi-CPU equipment, and it is hoped that an increasing number of systems will be able to report suitable processor information. Also with the 5.4 release, for the first time the agent will report the hrProcessorLoad value properly, which should provide some simple per-CPU statistics. The speed/type of my network interfaces is wrong - how can I fix it? ------------------------------------------------------------------- Some operating systems will provide a mechanism for determining the speed and type of network interfaces, but many do not. In such cases, the agent attempts to guess the most appropriate values, usually based on the name of the interface. The snmpd.conf directive "interface" allows you to override these guessed values, and provide alternative values for the name, type and speed of a particular interface. This is particularly useful for fast-ethernet, or dial-up interfaces, where the speed cannot be guessed from the name. See the snmpd.conf(5) man page for details. The interface statistics for my subinterfaces are all zero - why? ---------------------------------------------------------------- Unfortunately, most kernels that support multiple logical interfaces on a single physical interface, don't keep separate statistics for each of these. They simply report the overall statistics for the physical interface itself. There's no easy way around this problem - the agent can only report such information as is available. If the kernel doesn't keep track of these figures, the agent can't report them. Sorry! Does the agent support the RMON-MIB? ----------------------------------- Not really. There is an "Rmon" code module included within the agent source code tree, but this is best thought of as a template for the RMON-MIB statistics groups, rather than a full implementation. With most MIBs, the hardest part of implementing the MIB is often getting hold of the data to report. This is definitely true of the RMON-MIB, which relies on gathering (and analysing) a potentially large quantity of network traffic. The Rmon code distributed with the Net-SNMP agent code avoids this problem, by using random data. Some of the functionality of the RMON-MIB, such as the alarm and event groups, has since been superseded by the work of the DisMan IETF working group. The Net-SNMP agent does implement these (more general) MIB modules. But the statistics gathering aspects of the RMON-MIB are not readily available. Note too that none of the core developers have any significant experience with this code, and the person who originally wrote it is no longer active on the mailing lists. So there's no point in asking on the lists whether these modules work or not. You've got the source - how badly do you need this functionality? What does "klread: bad address" mean? ------------------------------------- This means that the agent was unable to extract some of the necessary information from the kernel structures. This is possibly due to: - either looking in the wrong place for kernel information (check the value of KERNEL_LOC) - an error in the implementation of part of the MIB tree for that architecture. Try and identify which OID is generating the error, and contact the list 'net-snmp-coders@lists.sourceforge.net' Remember to tell us what architecture you have! What does "nlist err: wombat not found" (or similar) mean? ---------------------------------------------------------- This means that the agent wasn't able to locate one of the kernel structures it was looking for. This may or may not be important - some systems provide alternative mechanisms for obtaining the necessary information - Solaris, for example, can produce a whole slew of such messages, but still provide the correct information. This error only occurs if you have used the flag '--enable-debugging' as part of the initial configuration. Reconfigure the agent with '--disable-debugging' and these messages will disappear. (It won't fix the underlying problem, but at least you won't be nagged about it). What does "Can't open /dev/kmem" mean? ------------------------------------- This device is normally restricted to just being accessible by root (or possibly by a special group such as 'kmem' or 'sys'). The agent must be able to read this device to obtain the necessary information about the running system. Check that the agent was started by root, and is running with UID 0 (or suitable GID if appropriate). The agent will normally continue to run without this level of access permission, but won't be able to report values for many of the variables (particularly those relating to network statistics). The system uptime (sysUpTime) returned is wrong! ----------------------------------------------- Oh no it's not. The defined meaning of 'sysUpTime' is "the time ... since the *network management* portion of the system was re-initialized." In other words, when the snmp agent was started, not when the system itself last booted. This latter information is available in the Host Resources MIB as "hrSystemUpTime.0" Note that even if the full Host Resources is not supported on your system, it's worth configuring in the system portion using '--with-mib-modules=host/hr_system' and recompiling. This particular group is reasonably likely to work, even if some of the other more architecture-specific groups don't. Can the agent run multi-threaded? -------------------------------- Short answer - no. Longer answer - not easily. Net-SNMP within a single thread of an threaded application is fine, as long as *all* snmp code is kept within the same thread. This lets you add SNMP support to an existing threaded application. If you are concerned with the time taken for to process requests for a particular agent, object or subtree, and you want the agent to continue to respond to other requests in the meantime, there are two options. The first method is using AgentX sub-agents. If you have several tables, each implemented by a separate subagent, then a single request for entries from each of the tables will be processed in parallel (and the agent will continue to respond to other requests while it waits for the subagents to return the necessary information). But a request for several objects from the same table will be passed off to the relevant subagent, where it will (normally) be processed serially. The second method is to use delegated requests + IPC to another process. If takes a long time to retrieve a value for a given object, then the object handler could do whatever necessary to start or communicate with another (non-SNMP) process/thread to actually retrieve the value, and mark the request as delegated. The main agent (or subagent) can then receive and process other requests while waiting for the delegated request to finish. Dealing with resource contention is all up to you. All of this only applies to the GET family of requests. A SET request will block until all pending GET requests have finished, and then will not accept new requests until the SET is complete. Adding full multi-thread support directly to the agent would be nice. We just need someone with time/money to do/sponsor the work. Can I use AgentX (or an embedded SNMP agent) in a threaded application? ----------------------------------------------------------------------- With care. As mentioned in the earlier "thread-safe" FAQ entry, the Net-SNMP agent (including the AgentX subagent) has not been designed for threaded operation. In particular, it makes use of various global variables without attempting to protect them against simultaneous use. This means that it is *NOT* safe to have SNMP or AgentX related processing in two separate threads. This also applies to handling GET (and SET) processing in one thread, and generating traps in another. This is still vulnerable to the usual threading problems. However, as long as *all* of the SNMP-related activity is limited to the one thread, then there should be no reason why this cannot safely communicate with other threads within the same application, using private (thread-safe) mechanisms. But in terms of the Net-SNMP-provided code, the agent (and AgentX subagent) should *not* be regarded as thread-safe. COMPILING ========= How do I control the environment used to compile the software? ------------------------------------------------------------- The basic mechanism for compiling the Net-SNMP project software is to run "configure", followed by "make" (to compile it), "make test" (to check that it's working properly) and then "make install" (to install the files into the correct locations - which typicalyl needs to be done as root. The primary role of "configure" is to determines various aspects about the system that the software is being compiled on. However there are also a number of options to configure which can be used to control various aspects of the compilation environment. The most common options are "--with-mib-modules" and "--with-out-mib-modules" which control the set of MIB module code files that are included within the agent binary. Adding or removing these modules will affect what MIB information the agent can return. See the entry "How do I add a MIB to the agent?" for more details. The configure script can also specify the compiler to use for compiling the source code (e.g. "configure --with-cc=cc"), the flags passed to this compiler (e.g. "configure --with-cflags=-g"), or to the linker (e.g. "configure --with-ldflags=-Bstatic"), and various other aspects of the build environment. Run "configure --help" for a full list. How do I control the environment used to compile the software under Windows? --------------------------------------------------------------------------- If you are compiling the project within the MinGW or Cygwin environments, then these use the same "configure" mechanism as Unix-based systems. See the previous entry for more information. If you are compiling the project from within Visual Studio, then this does not use the standard configure mechanism. Instead, there is a separate "Configure" script within the 'win32' directory. This can be used enable or disable various aspects of the build environment, such as support for encryption or IPv6. Run "Configure --help" for more information Note that this script does not include an equivalent of "--with-mib-modules" for extending the MIB information supported by the agent. Instead, this needs to be done by tweaking the build environment manually. See the file README.win32 for more details of this, and various other aspects of building the project on Windows systems. Why does the compilation complain about missing libraries? --------------------------------------------------------- This has been seen in a number of guises over the years - most commonly on Linux systems (although the problem may also occur elsewhere). The underlying problem is that typical installation may not always include the full set of library links required for building the Net-SNMP software. This problem can usually be fixed by installing the missing packages (typically the development version of a package that is already there). Examples of this that we have come across include: -lelf elfutils-devel (later renamed to elfutils-libelf-devel) -lbz2 bzip2-devel -lselinux libselinux-devel -lcrypto openssl/openssl-devel -lbeecrypt libbeecrypt/beecrypt/beecrypt-devel. These are the names of the RedHat/Fedora RPMs. Other distributions or O/S's may use different names, but the basic idea should be the same. If the compilation is complaining about a missing .so file, then an alternative quick fix is to add the missing symbolic link, using something like: ln -s libelf.so.1 /usr/lib/libelf.so giving the appropriate generic library name from the error message, and the correct number for whichever version of this library you have installed. If the compilation is complaining about a .la file, then you should install the relevant development package, as listed above. How can I reduce the memory footprint? -------------------------------------- In order to reduce the memory footprint (for instance, to embed the snmpd into a device), the following configure options could be used. '--disable-debugging' This turns off the compilation of all debugging statements. '--enable-mini-agent' '--with-out-mib-modules=examples/ucdDemoPublic' This creates an agent with just the essential MIB modules included. NOTE: If you need additional MIB modules, then simply add them using the option '--with-mib-modules=...' but this will of course increase the memory footprint. '--with-transports=UDP' This option specifies the transport domains to include. For a simple standalone agent, just UDP should be sufficient. (Although the 'disman' and 'agentx' modules may require the Callback, TCP and/or Unix transport domains as well). '--without-kmem-usage' This can be used in order to omit the code that operates on the /dev/kmem interface. Clearly, this option cannot be used when one of the configured MIB modules depends on it. '--with-mibdirs=' and '--with-mibs=' These options tell the agent not to load any MIB modules. This doesn't affect the size of libraries or application binaries, but will reduce the memory footprint during runtime. '--disable-mib-loading' This can be used in order to omit the code that loads and parses the MIB files altogether. This will reduce both the runtime memory footprint, and the binary sizes. Once the agent (snmpd) has been linked, you might also try running 'strip snmpd' to remove un-necessary debug/symbol information. How can I reduce the installation footprint or speed up compilation? ------------------------------------------------------------------- The following configure options may also be useful: --disable-agent Do not build the agent (snmpd). --disable-applications Do not build the apps (snmpget, ...). --disable-manuals Do not install the manuals. --disable-scripts Do not install the scripts (mib2c, ...). --disable-mibs Do not install the mib files. --disable-mib-loading Do not include code that parses and manipulates the mib files. How can I compile the project for use on an embedded system? ----------------------------------------------------------- Although this is definitely a Frequently Asked Question on the project mailing lists, it hasn't really been a Frequently _Answered_ Question. The basic problem is that none of the core development team have much involvement or experience with embedded systems. And although we have repeatedly put out a plea for implementation reports and advice, this has not so far been particularly successful. So the first thing to say is that the following suggestions should be treated with a greater than usual level of suspicion. The second thing to say is that compiling the Net-SNMP project for use on an embedded system typically means compiling the *agent* (rather than the trap receiver, or command-line tools). So that is what this entry will concentrate on. There are three main aspects to consider: - how to compile the code, - *what* code to compile, and - how to install the resulting agent binary. The Net-SNMP project uses the standard "configure" mechanism, so the usual cross-compilation options are available - in particular "--host" and "--target". It is also possible to specify the compiler and linker to use ("--with-cc" and "--with-ld"), and any special flags to pass to them ("--with-cflags" and "--with-ldflags"). There shouldn't be anything particularly special about compiling the Net-SNMP code, so see the documentation for your target environment for more information. (And please let us know if there *is* anything special that should be mentioned here!) If the aim is simply to generate an SNMP agent to run on the target system, it's probably not necessary to compile the command-line tools or trap receiver. The configure option "--disable-applications" will omit these elements. See the previous entry for other potentially relevant useful options. Unfortunately, the SNMP agent (and in particular, the code for individual MIB modules) is the most system-specific part of the Net-SNMP software. It may prove necessary to disable particular MIB modules if they do not compile successfully, or attempt to use the wrong system-specific APIs. This can be done using the configure option "--with-out-mib-modules". Alternatively, the option "--enable-mini-agent" will omit all but the core MIB module code. Additional modules can then be added individually using "--with-mib-modules". Further information about how to deal with problems with individual MIB modules is reliant on suitable reports being forthcoming from the wider Net-SNMP community. The ball is in your court! Finally, installing the agent binary is _not_ simply a matter of copying the "snmpd" file onto the target system. The agent typically relies on a number of additional libraries (and possibly the presence of assorted MIB files, unless this has been explicitly omitted). It is normally necessary to run "make install", before copying the installed framework to the target system. If the install destination needs to be different to the eventual location on the target system, this can be handled using the configure options "--prefix" (for the target location) and "--with-install-prefix" (for the temporary install location). Alternatively, this can be handled as part of the install command: make install prefix={target location} INSTALL_PREFIX={temp location} Alternatively, if the agent is compiled with static linking (and no MIB files), then it may be possible to simply copy the agent binary across to the target system. See the next entry for details. How can I compile the project to use static linking? --------------------------------------------------- For totally static net-snmp executables, use configure --with-ldflags=-Bstatic To compile your application with static libraries (eg for easier debugging), and to link to a non-installed build directory, try the following Makefile fragment: NETSNMPDIR=/usr/local/build/snmp/full-clean-cvs-V5-1-patches NETSNMPCONFIG=$(NETSNMPDIR)/net-snmp-config NETSNMPBASECFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags) NETSNMPINCLUDES := $(shell $(NETSNMPCONFIG) --build-includes $(NETSNMPDIR)) # base flags after build/src include, in case it has /usr/local/include NETSNMPCFLAGS=$(NETSNMPINCLUDES) $(NETSNMPBASECFLAGS) NETSNMPBASELIBS := $(shell $(NETSNMPCONFIG) --base-agent-libs) NETSNMPEXTLIBS := $(shell $(NETSNMPCONFIG) --external-agent-libs) NETSNMPLIBDIRS := $(shell $(NETSNMPCONFIG) --build-lib-dirs $(NETSNMPDIR)) NETSNMPLIBDEPS := $(shell $(NETSNMPCONFIG) --build-lib-deps $(NETSNMPDIR)) LIB_DEPS=$(NETSNMPLIBDEPS) LIBS=$(NETSNMPLIBDIRS) -Wl,-Bstatic $(NETSNMPBASELIBS) -Wl,-Bdynamic $(NETSNMPEXTLIBS) STRICT_FLAGS = -Wall -Wstrict-prototypes CFLAGS=-I. $(NETSNMPCFLAGS) $(STRICT_FLAGS) This replaces the standard Makefile section, which will used installed libraries: NETSNMPCONFIG=net-snmp-config # uncomment this if you have GNU make #NETSNMPCFLAGS := $(shell $(NETSNMPCONFIG) --base-cflags) #NETSNMPLIBS := $(shell $(NETSNMPCONFIG) --agent-libs) NETSNMPCFLAGS=`$(NETSNMPCONFIG) --base-cflags` NETSNMPLIBS=`$(NETSNMPCONFIG) --agent-libs` LIBS=$(NETSNMPLIBS) Why does 'make test' skip various tests? --------------------------------------- Some of the tests are only relevant to particular operating systems, or rely on specific areas of functionality. The test framework will check whether the relevant elements are available before running the relevant tests, and will skip them if these modules have been omitted from the build environment (or do not apply to the current system). One example of this are the tests T053agentv1trap, T054agentv2ctrap, T055agentv1mintrap, T056agentv2cmintrap and T113agentxtrap, which rely upon functionality from the NET-SNMP-EXAMPLES-MIB implementation. This module is not included in the default agent configuration, so the test framework will skip these tests. To include them, run "configure --with-mib-modules=examples/example" and re-compile. Why does 'make test' complain about a pid file? ----------------------------------------------- Typically it says something like: cat: cannot open /tmp/snmp-test-1-8694/*pid* It's trying to tell you the port is blocked - typically because another copy of the agent is still running, left over from from a previous testing run. If you type 'ps -ef' you should notice an orphaned process like: snmpd -d -r -U -P /tmp/snmp-test-5-27295/snmpd.pid... Kill this process. This could be happening for several reasons including: 1. You are trying to do concurrent runs of 'make test'. 2. On a slow machine, the agent might be taking too long to start up. Try changing the value of the variable SNMP_SLEEP in testing/RUNTESTS from 1 to something higher - say 3 or 5. CODING ====== How do I write C code to integrate with the agent? ------------------------------------------------- There are three main methods for integrating external C code within the agent. The code can be compiled directly into the agent itself, it can be loaded dynamically while the agent is running, or it can be compiled into a separate application (a "subagent") which communicates with the main master agent. All three approaches have been touched on elsewhere within this FAQ. As far as the module code is concerned, all three mechanisms use exactly the same module API. So a module developed for use directly within the agent, could also be included within a subagent, or loaded dynamically with no (or minimal) code changes needed. Most of this section is concerned with more detailed aspects of developing such code - including the 'mib2c' tool, which can handle generating a basic code framework for implementing a given set of MIB objects. How does the agent fetch the value of a MIB variable from the system? -------------------------------------------------------------------- That's typically the hardest bit of implementing a new MIB module, and is the one thing that 'mib2c' can't help with. It very much depends on the MIB variable concerned (and often the underlying operating system as well). Relatively few MIB modules are completely self-contained, with all the information held internally within the agent, and all updates being done via SNMP requests. Such MIB modules can be implemented fairly easily. More commonly, the agent needs to provide an SNMP-based interface to information held elsewhere, perhaps in the operating system kernel or some other application. Handling this is much more complex - since a lot depends on what mechanisms are provided for retrieving (and possibly updating) this information. The mib2c tool can generate code for processing SNMP requests, based on some internal cache of management information, but it cannot help with populating this cache with the underlying data. That is up to the MIB implementer. See the existing MIB modules in the Net-SNMP source tree for various examples of assorted approaches to this task. Mib2c complains about a missing "mib reference" - what does this mean? --------------------------------------------------------------------- This basically means that it hasn't loaded the MIB file containing the definition of the MIB subtree you're trying to implement. This might be because it hasn't been installed, the name is wrong, or (most likely), because it isn't in the default list. See the MIBS section for more details, or the next entry for suitable invocations of 'mib2c'. Mib2c complains about not having a "valid OID" - what does this mean? --------------------------------------------------------------------- This probably means that you gave it the name of a MIB file (or module), rather than the name of an object defined in that file. Mib2c expects the name of a 'root' object, and will generate a template for the sub-tree starting from there. If you've got a file 'MY-MIB.txt', defining the MIB module 'MY-MIB' which contains a subtree based on the object 'myMib', then you should invoke mib2c as "mib2c .... myMib" rather than "mib2c .... MY-MIB.txt" or "mib2c .... MY-MIB" Note that you'll probably also have to add your MIB to the list of MIBs that are loaded automatically, in order for mib2c to recognise the name of this object. So the command would typically be "MIBS=+MY-MIB mib2c .... myMib" or "MIBS=ALL mib2c .... myMib" Why doesn't mib2c like the MIB file I'm giving it? ------------------------------------------------- This is most likely the same problem as the previous entry. Mib2c takes the name of a MIB _object_, not the name of a file (or MIB module). Try using the name of the MODULE-IDENTITY definition. Another possibility is that the MIB may contain syntax errors. Try running it through 'snmptranslate' or a dedicated SMI validation tool (such as 'smilint' or the on-line interface at http://wwwsnmp.cs.utwente.nl/ietf/mibs/validate/) Mib2c ignores my MIB and generates a pair of 'mib-2' code files. Why? --------------------------------------------------------------------- This is usually a sign of the same problem as the previous entries, giving mib2c the name of the file containing the MIB (or of the MIB itself), rather than an object within it. Earlier versions of mib2c didn't detect this situation, and merrily constructed a template for a default starting point of the mib-2 node. More recent versions complain about not having a valid OID instead. What's the difference between the various mib2c configuration files? ------------------------------------------------------------------- Most of the mib2c config files are concerned with implementing MIB tables, and generate various alternative code templates. These basically fall into four distinct categories. 'mib2c.raw-table.conf' is the lightest of the templates, and just provides a fairly basic table framework. Most of the work of implementing the table - detecting which row is required for a given request, retrieving or updating the relevant column values, and interacting with the underlying subsystem - are all left to the MIB programmer. The second group of templates - 'table_data', 'container' and 'tdata' - all share the same basic model (although the internal details are rather different). The MIB implementer should define a data structure to represent a row of the table, and the helper then takes care of holding the table internally, as a collection of such per-row data structures. This includes identifying which row is required for a given request. Retrieving or updating the appropriate column value is left to the MIB programmer, although the generated framework includes most of the necessary code. Allied to this is a fourth "internal data" mib2c configuration file ('create-dataset') which handles the individual columns as well. This is the closest to a Plug-and-Play configuration, and the MIB implementer only needs to be concerned with any special processing, such as linking the table with the underlying subsystem. The third style of mib2c config assumes that the table data is held externally to the helper - either within the MIB module code itself, or in the external subsystem. The generated code framework includes routines to "iterate" through the rows of the table, with the iterator helper simply deciding which row is required for a particular request. Once again, the MIB programmer must handle retrieving or updating the appropriate column value, although the generated framework includes most of the necessary code. There is a variant of this config ('iterate_access') which works in basically the same way. However this tries to separate out the standard processing, from the code that needs to be amended by the programmer for retrieving and updating the individual column values. This is also the idea behind the final table-oriented mib2c config template - 'mib2c.mfd.conf' (or "MIBs for Dummies"). This is a much more flexible framework, which can be used with either internally held data, or iterating through an external representation. The distinguishing feature of this framework is that it separates out standard and table-specific processing, at a much finer level of detail than the others. The other mib2c config templates are concerned with implementing scalar objects ('scalar', 'int_watch'), code to generating traps ('notify'), and various specialised requirements. There is also a template ('old-api') to generate code suitable for the previous v4 UCD agent - though this is not particularly complete or reliable. It's probably better to use a pure v4 mib2c environment (or switch wholeheartedly to the v5 style). Which mib2c configuration file should I use? ------------------------------------------- The answer to that heavily depends on the characteristics of the MIB objects being implemented. Of the handler-based table frameworks, 'tdata' is more appropriate for tables that can be stored (or a copy cached) within the agent itself, while 'iterate' is more relevant to reporting data from outside the agent. The raw interface is only suitable in very specific circumstances, so it's probably sensible to start with one of the other frameworks first, and only look at this if none of the alternatives seem to work. The decision between the handler-based configs and MfD is more a matter of the style of programming to use. Most of the frameworks define a single handler routine to process an incoming request, so all of the code is listed together, with the MIB programmer inserting table-specific processing into this single block of code. The MfD provides a series of individual object-specific routines, each concerned with one very specific task, and hides as much as possible from the programmer. If you like to understand the broad thrust of what's happening, then one of the handler-based approaches would be the best choice. If you prefer to concentrate on the nitty-gritty of a given table, and are happy to trust that the rest of the processing will work correctly, then the MfD framework would be more appropriate. For implementing a group of scalar objects, then the choice is simple - use 'mib2c.scalar.conf'. Similarly, for generating traps or informs, use 'mib2c.notify.conf'. But note that this only assists with the code to actually generate the trap. It does not address the issue of _when_ to send the trap. See the FAQ entry "How can I get the agent to generate a trap?" for more information. How can I have mib2c generate code for both scalars and tables? -------------------------------------------------------------- This uses a very powerful tool called a "text editor" :-) The mib2c tool uses separate configuration files to generate code for scalar objects, and for tables. This means that it's not possible to automatically generate a single code file that supports both scalars and tables. Instead, the two code files need to be generated separately, and then combined manually. This will typically mean copying the handler routines for the scalar object(s) into the table file, and adding the code to register these handler(s) to the table initialisation routine. Are there any examples, or documentation for developing MIB modules? ------------------------------------------------------------------- Many of the MIB modules shipped with the Net-SNMP agent still use the v4 "traditional" MIB module API, but an increasing number use one of the newer v5 helper-based handlers. All of these can be found under 'agent/mibgroup' The 'tdata' helper is used in the new DisMan Event, Expression and Schedule MIB modules (see 'disman/{event,expr,schedule}/*'). The similar 'dataset' helper is used in the older DisMan Event MIB implementation (see 'disman/mteEvent*') and the Notification Log MIB (see 'notification-log-mib/*'), used by 'snmptrapd' to log incoming traps. The basic iterator handler is used in the TCP and UDP table implementations (mibII/tcpTable & mibII/udpTable), VACM context handling (mibII/vacm_context) and various tables relating to agent internals (agent/*). These show a number of different approaches to using the iterator helper, so it's worth comparing them. The two examples/netSnmpHostsTable* modules provide a contrast between the iterator and iterator_access helpers. There are several examples based on the MfD framework (see '{if,ip,tcp,udp}-mib/'). Much of this code is not intended to be viewed directly, but individual files are clearly commented to distinguish between internal implementation and public code. The Net-SNMP agent does not currently include any MIB modules using the array-user container-based helper. The best examples of this are to be found in the net-policy project. See http://net-policy.sourceforge.net/ Where should I put the files produced by 'mib2c'? ------------------------------------------------ If you're using the main source tree to compile your new module, then put these two files (mymib.[ch]) in the directory 'agent/mibgroup'. You should then re-run configure to add in your new module configure --with-mib-modules=mymib and recompile. If you've got a number of new modules to add, it might be sensible to put them all into a single subdirectory of 'mibgroup'. Then create a header file, listing the individual components. This might look something like: config_require(mymib/myObjects) config_require(mymib/myTable) config_require(mymib/myOtherTable) If this was saved as the file 'mymib.h', then the same configure line given above, would pull in all three modules. See the current contents of 'agent/mibgroup' for examples of this. Note that the MfD framework will generate a similar grouping automatically. Why doesn't my new MIB module report anything? --------------------------------------------- There are probably four main reasons why a new MIB module isn't working. Either it hasn't been included in the running agent, the code is present but hasn't been initialised, the module has been initialised but the handler isn't being called, or there's a problem with the module code itself. To check whether the code files are being compiled, the easiest approach is simply to look at the directory where the code is located. When the agent is compiled, this should produce .o files (and probably .lo files) corresponding to the C code files for this module. Alternatively, run 'nm' (or 'strings') on the MIB module library (libnetsnmpmibs), and look for the names of the initialisation routines or handlers (or the text of any messages displayed by the module code). One other thing to check is whether you have multiple copies of the software installed on the system. This is a particular problem when compiling from source (to include your new module), without first removing any vendor-supplied version of the agent (which won't include this new code). Assuming that you have confirmed that the module code is present in the agent, the next step is to check whether the initialisation routine is being called to register the MIB objects. The simplest way to do this is to include a suitable debugging statement within the initialisation routine, and start the agent with the corresponding '-Dtoken'. Alternatively, try walking the nsModuleName column object, and look for mention of the new MIB module. Assuming the module has been registered, the next step is to check whether the handler is being called, when the agent receives a suitable SNMP request. Again, the simplest way to do this is to include debugging statements within the handler routine, and start the agent with the corresponding '-Dtoken'. Then issue an "snmpget" request for an instance within the new MIB module. (This command is preferable to the usual "snmpwalk" command, as it is more closely focused on the MIB module in question). If this indicates that the handler routine isn't being called, then there are two main likely causes. Firstly, check the access control settings. If these are configured to block access to this portion of the OID tree, then the MIB handler will never be called. Secondly, several of the table helpers are designed to know which rows of the table are valid, and will call the main MIB handler with information about the relevant row. If the requested row is not valid (or the table is empty), then the handler will not be called. Finally, if the handler _is_ being called, but is still not returning any information, then the cause probably lies with your MIB module code. In which case, it's really up to you to find the problem and fix it! Either activate any debugging code that you have included within the handler routine, or run the agent under a source code debugger, and step through the handler processing. In either case, it's much easier to debug these problems when processing an "snmpget" request, rather than "snmpgetnext" or "snmpwalk". Remember that 'mib2c' simply generates template code for your MIB module. It's up to you to fill in the details, to report the actual information from whatever underlying subsystem is being monitored. Mib2c cannot help with the semantics of the MIB module - it's purely there to provide an initial code framework, based on the _syntax_ of the MIB module objects. Why does the iterator call my get_{first,next} routines so often? ----------------------------------------------------------------------- The first thing to realise is that the 'get_first' and 'get_next' hook routines are concerned with processing a single SNMP request, not with walking the whole table. A full "snmpwalk" command will typically involve a series of individual 'GetNext' requests, and every one of these will trigger a separate 'get_first/get_next/get_next/....' cycle. It's usually more efficient to use 'snmptable' which will walk each column in parallel (as well as displaying the results in a more natural manner). Secondly, the iterator helper was originally designed to handle unsorted data, so will look at every row of the internal table for each request. If the data is actually held in the correct order, then it's worth setting the NETSNMP_ITERATOR_FLAG_SORTED flag: iinfo = SNMP_MALLOC_TYPEDEF(netsnmp_iterator_info); iinfo->flags |= NETSNMP_ITERATOR_FLAG_SORTED; This will help the situation somewhat. But the iterator helper is inherently a relatively inefficient mechanism, and it may be worth looking at one of the other helpers, particularly if the data will be held within the agent itself. How can I get the agent to generate a trap (or inform)? ------------------------------------------------------ There are two aspects to having the agent generate a trap - knowing *how* to do this, and knowing *when* to do so. Actually generating a trap is reasonably simple - just call one of the trap API routines ('send_easy_trap()' or 'send_v2trap()') with the relevant information (generic and specific trap values, or a varbind list respectively). The 'mib2c.notify.conf' configuration file can be used to construct a suitable template routine for generating a trap, including building the variable list from the MIB trap definition. These variables can then be given suitable values, before invoking the 'send_v2trap()' call to actually send the trap. See the 'snmp_trap_api(3)' man page for further details. Note that these APIs are only available within the agent (or subagents), and are not available to stand-alone applications. The code for 'snmptrap' shows an approach to use in such a case. Determining *when* to generate the trap (either directly or via the mib2c-generated routine) is often harder. If the trap is generated in response to some action within the agent, (e.g. as the result of a SET), then this isn't too much of a problem. But if the trap is intended to report on a change of status (e.g. a network interface going up or down, or a disk filling up), then actually detecting this is non-trivial. Unless the underlying system can signal this situation to the agent, then it's typically necessary to poll the value(s) on a regular basis, save the results and compare them with the new values the next time round. The simplest way to handle this is via the DisMan Event MIB, which is designed for exactly this purpose. As long as you can specify a MIB object to monitor, and the value or thresholds that should trigger a notification, then this module can check these values regularly, and automatically send a suitable trap when appropriate. See the 'snmpd.conf(5)' man page (under ACTIVE MONITORING) for details. Otherwise, you'd need to use the routines documented in 'snmp_alarm(3)' to regularly invoke a monitoring routine. This would check the necessary conditions (which need not be MIB objects), and call the 'send_xxx_trap()' routine (as generated by 'mib2c.notify.conf') when appropriate. How can I get an AgentX sub-agent to generate a trap (or inform)? ---------------------------------------------------------------- This is done in exactly the same manner as with the main SNMP agent. Calling one of the routines described in 'snmp_trap_api(3)' will cause the AgentX sub-agent to send a notification to the master agent, which will then pass this on to the configured trap destination(s). One of the original design aims of the Net-SNMP AgentX support was that the agent (or subagent) framework should be transparent to a MIB module implementer. The interface between the agent framework and a MIB module should be independent of the protocol used to receive the original request. So the exact same MIB module code could be used within a traditional SNMP-only agent, or an AgentX subagent, with no changes needed. This also holds for sending traps. How can I get the agent to send an SNMPv1 (or SNMPv2c) trap? ----------------------------------------------------------- It doesn't make any difference whether you use the v1-style API call 'send_easy_trap()' or the v2-style 'send_v2trap()'. What matters is the directive(s) in the snmpd.conf file. If this file contains 'trapsink', then the agent will send an SNMPv1 trap. If this file contains 'trap2sink', then the agent will send an SNMPv2c trap. And if this file contains both, then the agent will send *two* copies of this trap. See the entry Where are these traps sent to? in the AGENT section for details. How can I get the agent to include varbinds with an SNMPv1 trap? --------------------------------------------------------------- There are two ways to do this. You can either use the 'send_v2trap()' call and give a varbind list, starting with the v2-equivalent of the SNMPv1 trap, followed by the additional varbinds. Alternatively, you can use the API call 'send_trap_vars()' which takes the same generic/specific trap values as 'send_easy_trap()', plus the list of additional varbinds. In either case, you also need to have 'trapsink' in the snmpd.conf file. The resulting trap will be identical, whichever approach is used. How can I get the agent to send an SNMPv1 enterprise-specific trap? ------------------------------------------------------------------ There are two ways to do this. You can either use the 'send_v2trap()' call and give a varbind list, starting with the v2-equivalent of the SNMPv1 trap, followed by the additional varbinds. Alternatively, you can use the (undocumented) API call 'send_enterprise_trap_vars()' which takes the same parameters as 'send_trap_vars()', plus the enterprise OID to use (in the usual name/length form). See the code file 'agent_trap.c' In either case, you also need to have 'trapsink' in the snmpd.conf file. The resulting trap will be identical, whichever approach is used. How can I get the agent to send an SNMPv3 trap (or inform)? ---------------------------------------------------------- It doesn't matter which API call you use to specify the trap - 'send_easy_trap()', 'send_v2trap()' or one of the other calls mentioned above. Generating an SNMPv3 notification (rather than a community-based one) is controlled by the snmpd.conf file. To send an SNMPv3 trap, this file should contain a 'snmpsess' directive, specifying the version, security level, user name and passphrases (if applicable), as well as the destination address. This is basically the same as the command line required for sending the trap manually, using 'snmptrap'. Note that (unlike 'snmptrap') this directive does *not* read default settings from an 'snmp.conf' file, so these must be specified explicitly in the 'snmpsess' line. Why does calling 'send_v2trap' generate an SNMPv1 trap (or vice versa)? ---------------------------------------------------------------------- The two versions of the trap API calls are concerned with how the trap is represented when it is passed *in* to the API, not the version of the trap PDU that will actually be generated by the agent. That is determined by the configuration token used to set up the trap destination. Remember that in general, all traps are sent to all destinations. This means that a trap specified using the SNMPv1 trap syntax needs to be converted to the SNMPv2 format before it can be sent to an SNMPv2 (or SNMPv3) destination. Similarly, a trap specified using the SNMPv2 syntax needs to be converted to the SNMPv1 format before it can be sent to an SNMPv1 sink. Essentially, the API call to use depends on what you asking for, which is not necessarily what the recipients will actually get! See 'snmp_trap_api(3)' for a fuller explanation. How can I register a MIB module in a different (SNMPv3) context? --------------------------------------------------------------- Contexts are a mechanism within SNMPv3 (and AgentX) whereby an agent can support parallel versions of the same MIB objects, referring to different underlying data sets. By default, a MIB module registrations will use the default empty context of "". But it's also possible to provide MIB information using a different (non-default) context. There are three aspects involved in doing this. Firsly, it's necessary to register the MIB module in this non-default context. With the v4 API, this uses the call 'register_mib_context()' rather than the REGISTER_MIB macro. This is significantly more detailed, but most of the additional parameters can take fixed values, if all that's needed is to change the registration context. Instead of the macro call: REGISTER_MIB("my_token", my_variables, variable1, my_variables_oid); use the function call: register_mib_context( "my_token", my_variables, sizeof(variable1), sizeof(my_variables)/sizeof(variable1), my_variables_oid, sizeof(my_variables_oid)/sizeof(oid), DEFAULT_MIB_PRIORITY, 0, 0, NULL, "my_context", -1, 0); Things are much easier with the v5 helper-based API. Having created the registration structure, this just requires setting the 'contextName' field before actually registering the MIB module: netsnmp_handler_registration *reg; reg = netsnmp_create_handler_registration(.....); reg->contextName = strdup("my_context"); netsnmp_register_handler(reg); Secondly, it is necessary to configure the access control settings to allow access to information in the new context. This is handled automatically when using the simple "rouser" or "rwuser" directives. But if access control is configured using the fuller com2sec/group/view/access mechanism, then the "access" line must specify the appropriate context(s), either explicitly: access {group} "my_context" any noauth exact ...... or using a single entry to cover all possible contexts: access {group} "" any noauth prefix ...... Finally, the SNMP request used to retrieve (or update) the information must also specify the required context. With SNMPv3 requests, the context is part of the protocol, so this can be done using a command-line option: snmpwalk -v 3 -n my_context ..... With community-based requests (SNMPv1 and SNMPv2c), things aren't so simple. Although the "rocommunity" and "rwcommunity" settings also configure access for all possible contexts, there's no way to specify a non-default context as part of the request. The only way to handle non-default contexts with community-based SNMP requests is to set up a mapping from the community string to the desired context. This uses the "com2sec" directive, with an additional "-Cn" parameter. Note that this also means that the access control must be configured using the full com2sec/group/view/access mechanism. The short-form access control directives do not handle the mapping of community strings to non-default contexts. MISC ====== What ASN.1 parser is used? ------------------------- The parser used by both the agent and client programs is coded by hand. This parser has recently been re-vamped to allow control of which of the available MIBs should be included, and to handle duplicate object subidentifiers. The source code can be found in the snmplib directory (in 'parse.c'), and the parser is usually bundled into the library 'libnetsnmp.a' Note that the parser attempts to be fairly forgiving of some common errors and incompatibilities in MIB files. The Net-SNMP tools accepting a MIB file without complaint does *not* imply that the MIB is strictly correct. Certain MIBs may need some amendments to allow them to be read correctly by the parser. Contact the coders' list for advice. What is the Official Slogan of the net-snmp-coders list? ------------------------------------------------------- "The current implementation is non-obvious and may need to be improved." (with thanks to Rohit Dube) And an alternate, added 26-Apr-2000: "In theory, it shouldn't be that hard, but it just needs to be done." PKz0]9 9 mib_indexes/0nu[PK{0]?U"" v README.agentxnu[PK{0]>ChangeLog.trimmednu[PK{0])/YYIETF-MIB-LICENSE.txtnu[PK{0]Q‰QQ EXAMPLE.confnu[PK{0]3 @README.mib2cnu[PK{0]!oVVI;COPYINGnu[PK{0]H README.krb5nu[PK{0] nREADME.snmpv3nu[PK{0]66READMEnu[PK{0]o PORTINGnu[PK{0]J kkTODOnu[PK{0];55 README.threadnu[PK{0]9z z :passtestnuȯPK{0]( fDipf-mod.plnu[PK{0]pUU^NEWSnu[PK{0]PPErREADME.agent-mibsnu[PK{0]lHq eAGENT.txtnu[PK{0]UmEE8FAQnu[PK?