diff -Nru ipmiutil-2.9.9/ChangeLog ipmiutil-3.0.0/ChangeLog --- ipmiutil-2.9.9/ChangeLog 2016-04-29 19:00:52.000000000 +0000 +++ ipmiutil-3.0.0/ChangeLog 2016-08-15 14:39:51.000000000 +0000 @@ -4169,6 +4169,29 @@ ...(various subcommands) ver 2.99 ifwum (ipmiutil fwum) ver 1.3 ihpm (ipmiutil hpm) ver 1.09 - iekanalyzer (ipmiutil ekanalyzer) ver 1.00 + idiscover (ipmiutil discover) ver 1.11 + ipmi_port (ipmi_port) ver 1.4 + +08/15/2016 ARCress ipmiutil-3.0.0 changes + util/ipmicmd.h - define RT_OEMIU as 0xDB + util/ipmicmd.c - if ERR_LAN_V2 set driver before open_lan2 + util/isel.c - add -i for RT_OEMIU 0xDB events + util/ievents.c - interpret RT_OEMIU 0xDB events + util/oem_supermicro.c - interpret SMC OEM 0xC8 events, + interpret SMC HDD sensors differently, + add factory defaults option + doc/ipmiutil.spec - put so.1 in base, so in devel + util/ipmiutil.mak - add LF_LANPLUS to DLL + util/oem_intel.c/h - add support for Kontron CG2300/Grantley (gdicaire) + util/ialarms.c - add support for Kontron CG2300/Grantley (gdicaire) + util/isensor.c - add support for Kontron CG2300/Grantley (gdicaire) + util/ihealth.c - add support for Intel S2600/Grantley (arcress) + util/iconfig.c - add SMC lanport save/restore + Makefile.am - clean up .deps directories in make tarball + ipmiutil-3.0.0 contains: + ipmiutil (ipmiutil) ver 3.00 + ...(various subcommands) ver 3.00 + ifwum (ipmiutil fwum) ver 1.3 + ihpm (ipmiutil hpm) ver 1.09 idiscover (ipmiutil discover) ver 1.11 ipmi_port (ipmi_port) ver 1.4 diff -Nru ipmiutil-2.9.9/configure ipmiutil-3.0.0/configure --- ipmiutil-2.9.9/configure 2016-04-29 19:00:47.000000000 +0000 +++ ipmiutil-3.0.0/configure 2016-08-15 14:39:45.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for ipmiutil 2.9.9. +# Generated by GNU Autoconf 2.63 for ipmiutil 3.0.0. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. @@ -743,8 +743,8 @@ # Identity of this package. PACKAGE_NAME='ipmiutil' PACKAGE_TARNAME='ipmiutil' -PACKAGE_VERSION='2.9.9' -PACKAGE_STRING='ipmiutil 2.9.9' +PACKAGE_VERSION='3.0.0' +PACKAGE_STRING='ipmiutil 3.0.0' PACKAGE_BUGREPORT='' ac_unique_file="util/ipmiutil.c" @@ -1503,7 +1503,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures ipmiutil 2.9.9 to adapt to many kinds of systems. +\`configure' configures ipmiutil 3.0.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1573,7 +1573,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of ipmiutil 2.9.9:";; + short | recursive ) echo "Configuration of ipmiutil 3.0.0:";; esac cat <<\_ACEOF @@ -1683,7 +1683,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -ipmiutil configure 2.9.9 +ipmiutil configure 3.0.0 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1697,7 +1697,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ipmiutil $as_me 2.9.9, which was +It was created by ipmiutil $as_me 3.0.0, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -2551,7 +2551,7 @@ # Define the identity of the package. PACKAGE='ipmiutil' - VERSION='2.9.9' + VERSION='3.0.0' cat >>confdefs.h <<_ACEOF @@ -13931,7 +13931,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by ipmiutil $as_me 2.9.9, which was +This file was extended by ipmiutil $as_me 3.0.0, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13994,7 +13994,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -ipmiutil config.status 2.9.9 +ipmiutil config.status 3.0.0 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff -Nru ipmiutil-2.9.9/configure.ac ipmiutil-3.0.0/configure.ac --- ipmiutil-2.9.9/configure.ac 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/configure.ac 2016-08-15 14:39:39.000000000 +0000 @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(ipmiutil,2.9.9) +AC_INIT(ipmiutil,3.0.0) AC_CONFIG_SRCDIR(util/ipmiutil.c) echo "ipmiutil version ${PACKAGE_VERSION}" AM_CONFIG_HEADER(config.h) diff -Nru ipmiutil-2.9.9/debian/changelog ipmiutil-3.0.0/debian/changelog --- ipmiutil-2.9.9/debian/changelog 2016-05-15 21:06:42.000000000 +0000 +++ ipmiutil-3.0.0/debian/changelog 2016-08-24 18:50:13.000000000 +0000 @@ -1,3 +1,11 @@ +ipmiutil (3.0.0-1) unstable; urgency=medium + + * New upstream release. + * debian/control: + - Add missing build dependency libtool-bin. + + -- Jörg Frings-Fürst Wed, 24 Aug 2016 20:50:13 +0200 + ipmiutil (2.9.9-1) unstable; urgency=medium * New upstream release. diff -Nru ipmiutil-2.9.9/debian/control ipmiutil-3.0.0/debian/control --- ipmiutil-2.9.9/debian/control 2016-05-15 19:30:16.000000000 +0000 +++ ipmiutil-3.0.0/debian/control 2016-08-24 05:11:45.000000000 +0000 @@ -8,7 +8,8 @@ dh-autoreconf, dh-systemd (>= 1.5), libfreeipmi-dev (>= 1.1.5) | libopenipmi-dev (>=2.0.18), - libssl-dev + libssl-dev, + libtool-bin Standards-Version: 3.9.8 Homepage: https://sourceforge.net/projects/ipmiutil/ Vcs-Git: https://anonscm.debian.org/cgit/collab-maint/ipmiutil.git diff -Nru ipmiutil-2.9.9/debpkg/changelog ipmiutil-3.0.0/debpkg/changelog --- ipmiutil-2.9.9/debpkg/changelog 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/debpkg/changelog 2016-08-15 14:39:39.000000000 +0000 @@ -1,3 +1,9 @@ +ipmiutil (3.0.0-1) unstable; urgency=low + + * New upstream version. + + -- Andy Cress Thu, 14 Jul 2016 11:46:24 -0400 + ipmiutil (2.9.9-1) unstable; urgency=low * New upstream version. diff -Nru ipmiutil-2.9.9/doc/ipmiutil.spec ipmiutil-3.0.0/doc/ipmiutil.spec --- ipmiutil-2.9.9/doc/ipmiutil.spec 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/doc/ipmiutil.spec 2016-08-15 14:39:39.000000000 +0000 @@ -3,7 +3,7 @@ # Copyright (c) 2012 Andy Cress # Name: ipmiutil -Version: 2.9.9 +Version: 3.0.0 Release: 1%{?dist} Summary: Easy-to-use IPMI server management utilities License: BSD @@ -35,9 +35,9 @@ %else %if 0%{?rhel} >= 7 BuildRequires: systemd-units -%define unit_dir %{_unitdir} %endif -%{!?unit_dir: %define unit_dir /usr/lib/systemd/system} +%{!?_unitdir: %define _unitdir /usr/lib/systemd/system} +%define unit_dir %{_unitdir} %endif %endif %define init_dir %{_initrddir} @@ -117,7 +117,7 @@ %{_sbindir}/ifirewall %{_sbindir}/ifwum %{_sbindir}/ihpm -%{_libdir}/libipmiutil.so* +%{_libdir}/libipmiutil.so.1 %{_datadir}/%{name}/ipmiutil_evt %{_datadir}/%{name}/ipmiutil_asy %{_datadir}/%{name}/ipmiutil_wdt @@ -176,12 +176,16 @@ %{_datadir}/%{name}/isensor.h %{_datadir}/%{name}/ievents.h %{_datadir}/%{name}/Makefile +%{_libdir}/libipmiutil.so %{_includedir}/ipmicmd.h %files static %defattr(-,root,root) %{_libdir}/libipmiutil.a +%post devel +/sbin/ldconfig + %pre %if 0%{?req_systemd} %service_add_pre ipmi_port.service ipmiutil_evt.service ipmiutil_asy.service ipmiutil_wdt.service diff -Nru ipmiutil-2.9.9/doc/Makefile ipmiutil-3.0.0/doc/Makefile --- ipmiutil-2.9.9/doc/Makefile 2016-04-29 19:00:51.000000000 +0000 +++ ipmiutil-3.0.0/doc/Makefile 2016-08-15 14:39:50.000000000 +0000 @@ -46,12 +46,12 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -99,7 +99,7 @@ LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = @@ -113,9 +113,9 @@ PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 2.9.9 +PACKAGE_STRING = ipmiutil 3.0.0 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 2.9.9 +PACKAGE_VERSION = 3.0.0 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -127,11 +127,11 @@ STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 2.9.9 -abs_builddir = /usr/dev/ipmiutil-2.9.9/doc -abs_srcdir = /usr/dev/ipmiutil-2.9.9/doc -abs_top_builddir = /usr/dev/ipmiutil-2.9.9 -abs_top_srcdir = /usr/dev/ipmiutil-2.9.9 +VERSION = 3.0.0 +abs_builddir = /usr/dev/ipmiutil-3.0.0/doc +abs_srcdir = /usr/dev/ipmiutil-3.0.0/doc +abs_top_builddir = /usr/dev/ipmiutil-3.0.0 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.0 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -159,7 +159,7 @@ htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.9/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.0/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff -Nru ipmiutil-2.9.9/doc/UserGuide ipmiutil-3.0.0/doc/UserGuide --- ipmiutil-2.9.9/doc/UserGuide 2016-04-29 19:00:52.000000000 +0000 +++ ipmiutil-3.0.0/doc/UserGuide 2016-08-15 14:39:51.000000000 +0000 @@ -1,6 +1,6 @@ IPMIUTIL USER GUIDE - VERSION 2.9.9 + VERSION 3.0.0 An easy-to-use IPMI server management utility diff -Nru ipmiutil-2.9.9/lib/libipmiutil.pc ipmiutil-3.0.0/lib/libipmiutil.pc --- ipmiutil-2.9.9/lib/libipmiutil.pc 2016-04-29 19:00:51.000000000 +0000 +++ ipmiutil-3.0.0/lib/libipmiutil.pc 2016-08-15 14:39:50.000000000 +0000 @@ -8,6 +8,6 @@ Name: libipmiutil Description: Library for ipmiutil -Version: 2.9.9 +Version: 3.0.0 Libs: -L${libdir} -lipmi_lanplus Cflags: -I${includedir} diff -Nru ipmiutil-2.9.9/lib/Makefile ipmiutil-3.0.0/lib/Makefile --- ipmiutil-2.9.9/lib/Makefile 2016-04-29 19:00:51.000000000 +0000 +++ ipmiutil-3.0.0/lib/Makefile 2016-08-15 14:39:50.000000000 +0000 @@ -47,12 +47,12 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -101,7 +101,7 @@ LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = @@ -115,9 +115,9 @@ PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 2.9.9 +PACKAGE_STRING = ipmiutil 3.0.0 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 2.9.9 +PACKAGE_VERSION = 3.0.0 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -129,11 +129,11 @@ STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 2.9.9 -abs_builddir = /usr/dev/ipmiutil-2.9.9/lib -abs_srcdir = /usr/dev/ipmiutil-2.9.9/lib -abs_top_builddir = /usr/dev/ipmiutil-2.9.9 -abs_top_srcdir = /usr/dev/ipmiutil-2.9.9 +VERSION = 3.0.0 +abs_builddir = /usr/dev/ipmiutil-3.0.0/lib +abs_srcdir = /usr/dev/ipmiutil-3.0.0/lib +abs_top_builddir = /usr/dev/ipmiutil-3.0.0 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.0 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -161,7 +161,7 @@ htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.9/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.0/install-sh libdir = $(iprefix)/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff -Nru ipmiutil-2.9.9/Makefile.am ipmiutil-3.0.0/Makefile.am --- ipmiutil-2.9.9/Makefile.am 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/Makefile.am 2016-08-15 14:39:39.000000000 +0000 @@ -32,6 +32,7 @@ cd $(TMPDIR)/test; make clean; cd .. cd $(TMPDIR)/hpiutil; make clean; cd .. cd $(TMPDIR); make distclean + cd $(TMPDIR); rm -rf util/.deps lib/lanplus/.deps cd $(TMPDIR); rm -f lib/libipmiapi*.a* lib/libipmi*.a cd $(TMPDIR); rm -rf autom4te.cache cd $(TMPDIR); rm -f util/events diff -Nru ipmiutil-2.9.9/Makefile.in ipmiutil-3.0.0/Makefile.in --- ipmiutil-2.9.9/Makefile.in 2016-04-29 19:00:47.000000000 +0000 +++ ipmiutil-3.0.0/Makefile.in 2016-08-15 14:39:46.000000000 +0000 @@ -762,6 +762,7 @@ cd $(TMPDIR)/test; make clean; cd .. cd $(TMPDIR)/hpiutil; make clean; cd .. cd $(TMPDIR); make distclean + cd $(TMPDIR); rm -rf util/.deps lib/lanplus/.deps cd $(TMPDIR); rm -f lib/libipmiapi*.a* lib/libipmi*.a cd $(TMPDIR); rm -rf autom4te.cache cd $(TMPDIR); rm -f util/events diff -Nru ipmiutil-2.9.9/scripts/Makefile ipmiutil-3.0.0/scripts/Makefile --- ipmiutil-2.9.9/scripts/Makefile 2016-04-29 19:00:51.000000000 +0000 +++ ipmiutil-3.0.0/scripts/Makefile 2016-08-15 14:39:50.000000000 +0000 @@ -46,12 +46,12 @@ SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run aclocal-1.11 -AMTAR = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run tar +ACLOCAL = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run aclocal-1.11 +AMTAR = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run tar AR = ar -AUTOCONF = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoconf -AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run autoheader -AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run automake-1.11 +AUTOCONF = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoconf +AUTOHEADER = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run autoheader +AUTOMAKE = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run automake-1.11 AWK = gawk CC = gcc CCDEPMODE = depmode=gcc3 @@ -99,7 +99,7 @@ LIPO = LN_S = ln -s LTLIBOBJS = -MAKEINFO = ${SHELL} /usr/dev/ipmiutil-2.9.9/missing --run makeinfo +MAKEINFO = ${SHELL} /usr/dev/ipmiutil-3.0.0/missing --run makeinfo MKDIR_P = /bin/mkdir -p NM = /usr/bin/nm -B NMEDIT = @@ -113,9 +113,9 @@ PACKAGE = ipmiutil PACKAGE_BUGREPORT = PACKAGE_NAME = ipmiutil -PACKAGE_STRING = ipmiutil 2.9.9 +PACKAGE_STRING = ipmiutil 3.0.0 PACKAGE_TARNAME = ipmiutil -PACKAGE_VERSION = 2.9.9 +PACKAGE_VERSION = 3.0.0 PATH_SEPARATOR = : PKG_DIR = /root/rpmbuild RANLIB = ranlib @@ -127,11 +127,11 @@ STRIP = strip SUBDIR_S = doc scripts lib util SYSTEMD_DIR = /usr/share/ipmiutil -VERSION = 2.9.9 -abs_builddir = /usr/dev/ipmiutil-2.9.9/scripts -abs_srcdir = /usr/dev/ipmiutil-2.9.9/scripts -abs_top_builddir = /usr/dev/ipmiutil-2.9.9 -abs_top_srcdir = /usr/dev/ipmiutil-2.9.9 +VERSION = 3.0.0 +abs_builddir = /usr/dev/ipmiutil-3.0.0/scripts +abs_srcdir = /usr/dev/ipmiutil-3.0.0/scripts +abs_top_builddir = /usr/dev/ipmiutil-3.0.0 +abs_top_srcdir = /usr/dev/ipmiutil-3.0.0 ac_ct_CC = gcc ac_ct_DUMPBIN = am__include = include @@ -159,7 +159,7 @@ htmldir = ${docdir} includedir = ${prefix}/include infodir = ${datarootdir}/info -install_sh = ${SHELL} /usr/dev/ipmiutil-2.9.9/install-sh +install_sh = ${SHELL} /usr/dev/ipmiutil-3.0.0/install-sh libdir = ${exec_prefix}/lib libexecdir = ${exec_prefix}/libexec localedir = ${datarootdir}/locale diff -Nru ipmiutil-2.9.9/setver ipmiutil-3.0.0/setver --- ipmiutil-2.9.9/setver 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/setver 2016-08-15 14:39:39.000000000 +0000 @@ -6,7 +6,7 @@ # [doinc?] is 'n'. # if [doinc?] is 'r', reverse increment (decrement). # -ver=2.9.9 +ver=3.0.0 rel=1 tmped=/tmp/edver.tmp tmpspec=/tmp/edspec.tmp diff -Nru ipmiutil-2.9.9/TODO ipmiutil-3.0.0/TODO --- ipmiutil-2.9.9/TODO 2016-04-29 19:00:52.000000000 +0000 +++ ipmiutil-3.0.0/TODO 2016-08-15 14:39:51.000000000 +0000 @@ -1,7 +1,8 @@ IPMIUTIL PROJECT TODO LIST: -IPV6: +IPV6 for IPMI LAN on Windows: + Currently support IPV6 on Linux, but need to implement for Windows also . implement IPV6 for Windows (#ifdef WIN32 case) Thread-safe changes for IPMI LAN: @@ -10,22 +11,10 @@ Will require adding a context struct param to the ipmi_cmd*() funcs. May need to add new thread-safe functions to retain back-compatibility. PARTIAL in ipmiutil-2.9.0, multiple nodes in sequence is fixed - . need to use context structure for ipmilan + . need to change to context structure for ipmilan -Add pkg-config support - COMPLETE in ipmiutil-2.9.5 (in configure.ac) - -Resolve MS ipmidrv.sys WBEM access memory leak: - This bug has been reported to Microsoft in Oct 2012 as shown below. - The workaround is to use the Intel imbdrv.sys driver instead. - See the ipmiutil UserGuide section 5.1 for details. - https://sourceforge.net/p/ipmiutil/support-requests/11/ - https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ca4df181-7fd4-4912-83a0-5896b030e3ca/latest-version-of-microsoft-ipmi-driver-ipmidrvsys?forum=wdk - -stdout/stderr debug messages mixed - . have a variable for stderr and if -x debug, set it to stdout. - . implemented in util/subs.c lprintf() based on log level - COMPLETE in ipmiutil-2.9.7 +Add an option/variant of canonical output for CSV (delimiter = ',') + The current delimiter for -c is '|' SPD decoding: . handle DDR4 SPD format @@ -33,9 +22,6 @@ c handle DDR3 SPD 1.0 format PARTIAL in ipmiutil-2.9.1 -SuperMicro Users: - . implement an OEM cmd to set user privilege level (needs research) - Add additional IPMI 2.0 commands from addendum: c Get/Set System Info . Get/Set SEL UTC Offset (requested 4/22/13) @@ -46,12 +32,20 @@ . Get/Set DCMI Configuration Parameters (DCMI 1.5) . Get/Set Thermal Limit (DCMI 1.5) -Add an option/variant of canonical output for CSV (delimiter = ',') - The current delimiter for -c is '|' - Add support for MAC OSX AppleBMC.kext driver Not yet implemented, pending some documentation from Apple. +Resolve MS ipmidrv.sys WBEM access memory leak: + This bug has been reported to Microsoft in Oct 2012 as shown below. + The workaround is to use the Intel imbdrv.sys driver instead. + See the ipmiutil UserGuide section 5.1 for details. + https://sourceforge.net/p/ipmiutil/support-requests/11/ + https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/ca4df181-7fd4-4912-83a0-5896b030e3ca/latest-version-of-microsoft-ipmi-driver-ipmidrvsys?forum=wdk + OPEN - no update/fix from Microsoft + +SuperMicro Users: + . implement an OEM cmd to set user privilege level (needs research) + More automated testing Started this in ipmiutil-2.6.6 with testipmi.sh, but it could be more extensive and be tested on more types of IPMI firmware. @@ -76,6 +70,14 @@ ------------------------------------------------------------------------------ IPMIUTIL COMPLETED TODO TASKS: +stdout/stderr debug messages mixed + . have a variable for stderr and if -x debug, set it to stdout. + . implemented in util/subs.c lprintf() based on log level + COMPLETE in ipmiutil-2.9.7 + +Add pkg-config support + COMPLETE in ipmiutil-2.9.5 (in configure.ac) + Add support for a MAC OSX client It should work with minor compile-time adjustments. We need a system running OSX on which to build and test this. diff -Nru ipmiutil-2.9.9/util/ialarms.c ipmiutil-3.0.0/util/ialarms.c --- ipmiutil-2.9.9/util/ialarms.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ialarms.c 2016-08-15 14:39:39.000000000 +0000 @@ -75,7 +75,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "ialarms"; static char fdebug = 0; static char fbmctam = 0; @@ -112,6 +112,7 @@ static uchar busid = PRIVATE_BUS_ID; static uchar enc_sa = HSC_SA; static char fRomley = 0; +static char fGrantley = 0; static int get_enc_leds(uchar *val) { @@ -488,12 +489,13 @@ ret = detect_capab_intel(vend_id,prod_id,&flags,&maxdisks,fdebug); busid = (uchar)ret; if (fdebug) printf("prod_capab: busid=%x, flags=%02x\n",busid,flags); - if ((flags & HAS_ALARMS_MASK) != 0) fHasAlarms = 1; - if ((flags & HAS_BMCTAM_MASK) != 0) fbmctam = 1; - if ((flags & HAS_ENCL_MASK) != 0) fHasEnc = 1; - if ((flags & HAS_PICMG_MASK) != 0) fpicmg = 1; - if ((flags & HAS_NSC_MASK) != 0) fNSC = 1; - if ((flags & HAS_ROMLEY_MASK) != 0) fRomley = 1; + if ((flags & HAS_ALARMS_MASK) != 0) fHasAlarms = 1; + if ((flags & HAS_BMCTAM_MASK) != 0) fbmctam = 1; + if ((flags & HAS_ENCL_MASK) != 0) fHasEnc = 1; + if ((flags & HAS_PICMG_MASK) != 0) fpicmg = 1; + if ((flags & HAS_NSC_MASK) != 0) fNSC = 1; + if ((flags & HAS_ROMLEY_MASK) != 0) fRomley = 1; + if ((flags & HAS_GRANTLEY_MASK) != 0) fGrantley = 1; /* get ID LED status */ ret = get_led_status_intel(&idstate); if (ret == 0) { @@ -613,11 +615,11 @@ } if (fHasEnc && fdoencl) { /* disk enclosure exists */ - if (fRomley) { /* Romley (Patsburg) */ + if (fRomley || fGrantley) { /* Romley (Patsburg) */ int rv; /*do not change ret*/ rv = get_enc_leds_intel(&encled); if (rv == 0) { - show_enc_leds_intel(encled,maxdisks); + show_enc_leds_intel(encled,maxdisks); if (fsetdisk) { /* Set fault if user param, and disk is present. */ if (fsetall) newvalue = 0x00; /* all LEDs off */ diff -Nru ipmiutil-2.9.9/util/icmd.c ipmiutil-3.0.0/util/icmd.c --- ipmiutil-2.9.9/util/icmd.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/icmd.c 2016-08-15 14:39:39.000000000 +0000 @@ -78,7 +78,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "icmd"; static char fdebug = 0; static char fquiet = 0; diff -Nru ipmiutil-2.9.9/util/iconfig.c ipmiutil-3.0.0/util/iconfig.c --- ipmiutil-2.9.9/util/iconfig.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/iconfig.c 2016-08-15 14:39:39.000000000 +0000 @@ -171,7 +171,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "iconfig"; static char fdebug = 0; static char fipmilan = 0; @@ -186,6 +186,7 @@ static uchar fmBMC = 0; static uchar fiBMC = 0; static uchar fRomley = 0; +static uchar fGrantley = 0; static char fipv6 = 0; static char fcanonical = 0; static char fchan2wart = 0; /* =1 if need wart to skip channel 2 */ @@ -1337,13 +1338,13 @@ "arping -I %s -c 2 %d.%d.%d.%d |grep reply |tail -n1 >%s\n", _ifname,ipadr[0],ipadr[1],ipadr[2],ipadr[3],alertfile); if (fdebug) printf("%s", arping_cmd); - system(arping_cmd); + i = system(arping_cmd); fparp = fopen(alertfile,"r"); if (fparp == NULL) { fprintf(stdout,"Get_Mac: Cannot open %s, errno = %d\n", alertfile,get_errno()); - ret = -1; + ret = -1; } else { while (fgets(buff, 1023, fparp)) { /* should only run through loop once */ @@ -2002,13 +2003,14 @@ #endif break; } /*end switch*/ - if (is_romley(vend_id,prod_id)) { - fRomley = 1; + if (is_romley(vend_id,prod_id)) fRomley = 1; + if (is_grantley(vend_id,prod_id)) fGrantley = 1; + if (fRomley) { fiBMC = 1; /* Intel iBMC */ fsharedMAC = 0; /* not-shared BMC LAN port, separate MAC */ set_max_kcs_loops(URNLOOPS); /*longer for SetLan cmds */ fipv6 = 1; - } + } } else if (vend_id == VENDOR_KONTRON) { //if (prod_id == 0x1590) fchan2wart = 1; /* KTC5520 chan2 wart */ fsharedMAC = 0; /* not-shared BMC MAC */ @@ -2324,7 +2326,10 @@ case LAN_FAILOVER: /* Intel LAN Failover */ if (is_romley(vend_id,prod_id)) ret = lan_failover_intel(0xFF,&LanRecord[0]); - else continue; /*skip if not Intel Romley */ + else if ((vend_id == VENDOR_SUPERMICROX) || (vend_id == VENDOR_SUPERMICRO)) { + ret = oem_supermicro_get_lan_port(&LanRecord[0]); + if (fdebug) printf("SMC get_lan_port ret=%d val=%d\n",ret,LanRecord[0]); + } else continue; /*skip if not Intel Romley */ sz = 1; fignore_err = 1; break; @@ -2641,7 +2646,10 @@ case LAN_FAILOVER: /* Intel LAN Failover */ if (is_romley(vend_id,prod_id)) ret = lan_failover_intel(LanRecord[0],(uchar *)&i); - else continue; /*skip if not Intel Romley*/ + else if ((vend_id == VENDOR_SUPERMICROX) || (vend_id == VENDOR_SUPERMICRO)) { + ret = oem_supermicro_set_lan_port(LanRecord[0]); + if (fdebug) printf("SMC set_lan_port(%d) = %d\n",LanRecord[0],ret); + } else continue; /*skip if not Intel Romley*/ break; default: ret = LAN_ERR_NOTSUPPORT; diff -Nru ipmiutil-2.9.9/util/idcmi.c ipmiutil-3.0.0/util/idcmi.c --- ipmiutil-2.9.9/util/idcmi.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/idcmi.c 2016-08-15 14:39:39.000000000 +0000 @@ -62,7 +62,7 @@ #include "idcmi.h" static char * progname = "idcmi"; -static char * progver = "2.99"; +static char * progver = "3.00"; extern char fdebug; /*from ipmicmd.c*/ static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff -Nru ipmiutil-2.9.9/util/ievents.c ipmiutil-3.0.0/util/ievents.c --- ipmiutil-2.9.9/util/ievents.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ievents.c 2016-08-15 14:39:39.000000000 +0000 @@ -76,7 +76,7 @@ #define SELprintf printf #define SMS_SA 0x41 #define SMI_SA 0x21 -static char *progver = "2.99"; +static char *progver = "3.00"; static char *progname = "ievents"; static char fsensdesc = 0; /* 1= get extended sensor descriptions*/ static char fcanonical = 0; /* 1= show canonical, delimited output*/ @@ -1601,7 +1601,31 @@ j = decode_sel_oem(vend,pevt,outbuf,szbuf,fsensdesc,fdebug); if (j == 0) return(0); /*successful, have the description*/ - if (psel->record_type == 0xDC) { + if (psel->record_type == RT_OEMIU) { /* 0xDB usu ipmiutil OEM string */ + int ix = 0; + /* ipmiutil OEM event with 9-byte string */ + pc = (uchar *)&psel->generator_id; /* offset 7 */ + evtime = (uchar *)&psel->timestamp; + eventTime = evtime[0] + (evtime[1] << 8) + + (evtime[2] << 16) + (evtime[3] << 24); + fmt_time(eventTime, timebuf, sizeof(timebuf)); + if (fcanonical) + sprintf(outbuf,"%04x %c %s %c %s %c %02x %c %06x %c %s %c OEM Event ", + psel->record_id, bdelim, timebuf, bdelim, + get_sev_str(sev), bdelim, psel->record_type, bdelim); + else + sprintf(outbuf,"%04x %s %s %02x OEM Event ", + psel->record_id, timebuf, get_sev_str(sev), + psel->record_type); + j = strlen_(outbuf); + for (i = 0; i < 9; i++) { /* 7:16 = 9 bytes string data */ + if (pc[i] == 0) outbuf[j] = ' '; + else sprintf(&outbuf[j],"%c",pc[i]); + j += 1; + } + outbuf[j++] = '\n'; + outbuf[j++] = 0; + } else if (psel->record_type == 0xDC) { /* OEM Record: these are usually Microsoft */ char *mfgstr; int mfg; diff -Nru ipmiutil-2.9.9/util/ifirewall.c ipmiutil-3.0.0/util/ifirewall.c --- ipmiutil-2.9.9/util/ifirewall.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ifirewall.c 2016-08-15 14:39:39.000000000 +0000 @@ -64,7 +64,7 @@ /* global variables */ static char * progname = "ifirewall"; -static char * progver = "2.99"; +static char * progver = "3.00"; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff -Nru ipmiutil-2.9.9/util/ifru.c ipmiutil-3.0.0/util/ifru.c --- ipmiutil-2.9.9/util/ifru.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ifru.c 2016-08-15 14:39:39.000000000 +0000 @@ -116,7 +116,7 @@ #endif static char *progname = "ifru"; -static char *progver = "2.99"; +static char *progver = "3.00"; static int vend_id = 0; static int prod_id = 0; static char fdebug = 0; diff -Nru ipmiutil-2.9.9/util/ifruset.c ipmiutil-3.0.0/util/ifruset.c --- ipmiutil-2.9.9/util/ifruset.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ifruset.c 2016-08-15 14:39:39.000000000 +0000 @@ -106,7 +106,7 @@ #define IPROD_OEM 7 static char *progname = "ifruset"; -static char *progver = "2.99"; +static char *progver = "3.00"; static char fdebug = 0; static char fpicmg = 0; static char fonlybase = 0; diff -Nru ipmiutil-2.9.9/util/igetevent.c ipmiutil-3.0.0/util/igetevent.c --- ipmiutil-2.9.9/util/igetevent.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/igetevent.c 2016-08-15 14:39:39.000000000 +0000 @@ -169,7 +169,7 @@ * Global variables */ static char * progname = "igetevent"; -static char * progver = "2.99"; +static char * progver = "3.00"; static char fdebug = 0; static char fipmilan = 0; static char frunonce = 0; diff -Nru ipmiutil-2.9.9/util/ihealth.c ipmiutil-3.0.0/util/ihealth.c --- ipmiutil-2.9.9/util/ihealth.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ihealth.c 2016-08-15 14:39:39.000000000 +0000 @@ -82,7 +82,7 @@ * Global variables */ static char * progname = "ihealth"; -static char * progver = "2.99"; +static char * progver = "3.00"; static char fdebug = 0; static char fipmilan = 0; static char fcanonical = 0; @@ -135,6 +135,36 @@ return rv; } +char *getdmiprod(void) +{ + char *prod = ""; +#ifdef LINUX + static char dmiprod[32]; + char cmd[160]; + char *dmitmp = "/tmp/dmi.tmp"; + FILE *fp; + int rv, i; + if (fipmilan) return(prod); + sprintf(cmd,"dmidecode | grep -A6 \"^Base Board\" |grep 'Product Name' |cut -f2 -d':' |awk '{ print $1 }' >%s",dmitmp); + rv = system(cmd); + if (rv == 0) { + fp = fopen(dmitmp,"r"); + if (fp == NULL) rv = -1; + else { + if (fgets(dmiprod, sizeof(dmiprod), fp) == NULL) rv = -2; + else { + for (i=0; i 1) failover_enable = 0; /*default*/ ret = lan_failover_intel(failover_enable,(uchar *)&i); printf("Set Intel Lan Failover (%d), ret = %d\n", diff -Nru ipmiutil-2.9.9/util/ipicmg.c ipmiutil-3.0.0/util/ipicmg.c --- ipmiutil-2.9.9/util/ipicmg.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipicmg.c 2016-08-15 14:39:39.000000000 +0000 @@ -81,7 +81,7 @@ /* Global data */ static char * progname = "ipicmg"; -static char * progver = "2.99"; +static char * progver = "3.00"; static char fdebug = 0; static char fset_mc = 0; static uint8_t g_bus = PUBLIC_BUS; diff -Nru ipmiutil-2.9.9/util/ipmicmd.c ipmiutil-3.0.0/util/ipmicmd.c --- ipmiutil-2.9.9/util/ipmicmd.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmicmd.c 2016-08-15 14:39:39.000000000 +0000 @@ -662,8 +662,9 @@ /* Use IPMI LAN 2.0 if BMC said it only supports LAN2 */ /* This is a violation of IPMI 2.0 Spec section 13.4, * but some HP firmware behaves this way, so handle it. */ - rc = ipmi_open_lan2(gnode,lanp.user,lanp.pswd,fdebugcmd); fDriverTyp = DRV_LAN2; + rc = ipmi_open_lan2(gnode,lanp.user,lanp.pswd,fdebugcmd); + if (rc != 0) fDriverTyp = DRV_UNKNOWN; } } else { /* local, not lan */ #ifdef WIN32 @@ -1364,7 +1365,7 @@ break; case 'F': /* force driver type */ i = set_driver_type(popt); - if (i == 0) fset_dtype = 1; + if (i == 0) fset_dtype = 1; break; case 'T': /* auth type */ i = atoi(popt); diff -Nru ipmiutil-2.9.9/util/ipmicmd.h ipmiutil-3.0.0/util/ipmicmd.h --- ipmiutil-2.9.9/util/ipmicmd.h 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmicmd.h 2016-08-15 14:39:39.000000000 +0000 @@ -325,6 +325,8 @@ #define BCOLON ':' /*delimeter some output with colons*/ #define BCOMMENT '#' /*delimeter '#' used for comments */ +#define RT_OEMIU 0xDB /*record type for OEM ipmiutil events*/ + #ifndef LOG_WARN #define LOG_EMERG 0 // system is unusable #define LOG_ALERT 1 // action must be taken immediately diff -Nru ipmiutil-2.9.9/util/ipmilanplus.c ipmiutil-3.0.0/util/ipmilanplus.c --- ipmiutil-2.9.9/util/ipmilanplus.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmilanplus.c 2016-08-15 14:39:39.000000000 +0000 @@ -50,7 +50,7 @@ int ipmi_cmdraw_lan2(char *node, uchar cmd, uchar netfn, uchar lun, uchar sa, uchar bus, uchar *pdata, int sdata, uchar *presp, int *sresp, uchar *pcc, char fdebugcmd) -{ return(LAN_ERR_INVPARAM); } +{ printf("lanplus not configured\n"); return(LAN_ERR_INVPARAM); } int ipmi_cmd_lan2(char *node, ushort cmd, uchar *pdata, int sdata, uchar *presp, int *sresp, uchar *pcc, char fdebugcmd) diff -Nru ipmiutil-2.9.9/util/ipmiutil64.mak ipmiutil-3.0.0/util/ipmiutil64.mak --- ipmiutil-2.9.9/util/ipmiutil64.mak 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmiutil64.mak 2016-08-15 14:39:39.000000000 +0000 @@ -26,7 +26,7 @@ L2_OBJ = $(L2_D)\helper.obj $(L2_D)\ipmi_strings.obj $(L2_D)\lanplus.obj \ $(L2_D)\lanplus_crypt_impl.obj $(L2_D)\lanplus_dump.obj \ $(L2_D)\lanplus_strings.obj $(L2_D)\lanplus_crypt.obj -LF_LANPLUS=/LIBPATH:$(LIB_D) $(L2_OBJ) ssleay32.lib libeay32.lib +LF_LANPLUS=/LIBPATH:$(LIB_D) /LIBPATH:$(L2_D) $(L2_OBJ) ssleay32.lib libeay32.lib CF_LANPLUS=/D HAVE_LANPLUS # Set your compiler options @@ -36,7 +36,7 @@ # CFLAGS_O=/W3 /O2 /Zi /MT /nologo CFLAGS_O=/W3 /O2 /Zi /MT /nologo CF_EX=/DWIN32 $(CF_LANPLUS) $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DHAVE_STRING_H -CF_SAM=/DWIN32 $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /DHAVE_STRING_H +CF_SAM=/DWIN32 $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /DHAVE_STRING_H $(CF_LANPLUS) CFLAGS=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2 CFLAGS_M=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2 /DMETACOMMAND CFLAGS_SAM=$(CFLAGS_O) $(CF_SAM) @@ -397,24 +397,24 @@ $(SAMP_DLL): $(CMD_OBJ) mem_if.obj $(CC) /D_WINDLL /D_USRDLL /c $(CFLAGS_SAM) ipmilanplus.c - $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LIBS_EX) + $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) del ipmilanplus.obj ipmi_sample.exe: $(SAMP_LIB) ipmi_sample.obj - $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) ipmi_sample2.exe: $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c $(CC) /c $(CFLAGS_SAM) /DGET_SENSORS ipmi_sample.c $(CC) /c $(CFLAGS_SAM) isensor.c $(CC) /c $(CFLAGS_SAM) ievents.c - $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) - del isensor.obj ievents.obj + $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) + del isensor.obj ievents.obj ipmi_sample.obj ifruset.obj: ifruset.c $(CC) /c $(CFLAGS_SAM) ifruset.c ifruset.exe: $(SAMP_LIB) ifruset.obj ifru_picmg.obj - $(LINK) $(LFLAGS) /OUT:ifruset.exe ifruset.obj ifru_picmg.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) /OUT:ifruset.exe ifruset.obj ifru_picmg.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) ipmi_sample_evt.obj: ipmi_sample_evt.c $(HEADER) $(CC) /c $(CFLAGS_SAM) ipmi_sample_evt.c @@ -426,5 +426,5 @@ $(CC) /c /Foievents2.obj $(CFLAGS_SAM) /DSENSORS_OK ievents.c ipmi_sample_evt.exe: $(SAMP_LIB) ipmi_sample_evt.obj ievents2.obj isensor2.obj - $(LINK) $(LFLAGS) /OUT:ipmi_sample_evt.exe ipmi_sample_evt.obj ievents2.obj isensor2.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) $(LF_LANPLUS) /OUT:ipmi_sample_evt.exe ipmi_sample_evt.obj ievents2.obj isensor2.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) diff -Nru ipmiutil-2.9.9/util/ipmiutil.c ipmiutil-3.0.0/util/ipmiutil.c --- ipmiutil-2.9.9/util/ipmiutil.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmiutil.c 2016-08-15 14:39:39.000000000 +0000 @@ -57,7 +57,7 @@ #include "ipmiutil.h" static char *progname = "ipmiutil"; -static char *progver = "2.99"; +static char *progver = "3.00"; // static char fdebug = 0; /*int ipmiutil(int argc, char **argv); */ @@ -122,6 +122,8 @@ } #endif +#ifndef _WINDLL +/* omit main if compiled as a Windows DLL */ #ifdef WIN32 int __cdecl #else @@ -225,5 +227,6 @@ } return(ret); } +#endif /*end ipmiutil.c*/ diff -Nru ipmiutil-2.9.9/util/ipmiutil.mak ipmiutil-3.0.0/util/ipmiutil.mak --- ipmiutil-2.9.9/util/ipmiutil.mak 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ipmiutil.mak 2016-08-15 14:39:39.000000000 +0000 @@ -26,7 +26,7 @@ L2_OBJ = $(L2_D)\helper.obj $(L2_D)\ipmi_strings.obj $(L2_D)\lanplus.obj \ $(L2_D)\lanplus_crypt_impl.obj $(L2_D)\lanplus_dump.obj \ $(L2_D)\lanplus_strings.obj $(L2_D)\lanplus_crypt.obj -LF_LANPLUS=/LIBPATH:$(LIB_D) $(L2_OBJ) ssleay32.lib libeay32.lib +LF_LANPLUS=/LIBPATH:$(LIB_D) /LIBPATH:$(L2_D) $(L2_OBJ) ssleay32.lib libeay32.lib CF_LANPLUS=/D HAVE_LANPLUS # Set your compiler options @@ -36,7 +36,7 @@ # CFLAGS_O=/W3 /O2 /Zi /MT /nologo CFLAGS_O=/W3 /O2 /Zi /MT /nologo CF_EX=/DWIN32 $(CF_LANPLUS) $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /DHAVE_STRING_H -CF_SAM=/DWIN32 $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /DHAVE_STRING_H +CF_SAM=/DWIN32 $(INC) /D_CONSOLE /D_CRT_SECURE_NO_DEPRECATE /DHAVE_STRING_H $(CF_LANPLUS) CFLAGS=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2 CFLAGS_M=$(CFLAGS_O) $(CF_EX) /DSKIP_MD2 /DMETACOMMAND CFLAGS_SAM=$(CFLAGS_O) $(CF_SAM) @@ -58,7 +58,6 @@ RM=del CP=copy -# added ws2_32.lib LIBS_EX = advapi32.lib kernel32.lib wsock32.lib ws2_32.lib $(LIBS_W) $(LIBC_RT) LIBS_PEF = /LIBPATH:$(LIB_D) iphlpapi.lib # LIBS_EX+=wsock32.lib user32.lib gdi32.lib @@ -67,7 +66,7 @@ ipmiutil.h SHOWSEL = showsel -TARG_EXE=ievents.exe $(SHOWSEL)msg.dll ipmi_sample.exe ipmi_sample_evt.exe $(SAMP_DLL) +TARG_EXE=ievents.exe $(SHOWSEL)msg.dll ipmi_sample.exe ipmi_sample2.exe ipmi_sample_evt.exe $(SAMP_DLL) # alarms.exe ihealth.exe $(SHOWSEL).exe $(SHOWSEL)msg.dll \ # ireset.exe ifru.exe ilan.exe iserial.exe wdt.exe \ # getevent.exe sensor.exe icmd.exe isolconsole.exe idiscover.exe \ @@ -120,14 +119,12 @@ $(RM) $(TARG_EXE) 2>NUL $(RM) *.exe 2>NUL -$(RM) $(TMP_D)\*.obj 2>NUL - -$(RM) *.manifest 2>NUL distclean: $(RM) *.obj 2>NUL $(RM) $(TARG_EXE) 2>NUL $(RM) *.exe 2>NUL -$(RM) $(TMP_D)\*.* 2>NUL - -$(RM) *.manifest 2>NUL rmdir $(TMP_D) 2>NUL $(RM) *.rc 2>NUL $(RM) *.bin 2>NUL @@ -389,8 +386,6 @@ $(E_EXE): $(E_OBJ) $(LINK) $(LFLAGS) /OUT:$(E_EXE) $(E_OBJ) $(LF_LANPLUS) $(LIBS_PEF) $(LIBS_EX) - -# mt.exe -manifest $(E_EXE).manifest -outputresource:$(E_EXE);1 ipmi_sample.obj: ipmi_sample.c $(CC) /c $(CFLAGS_SAM) ipmi_sample.c @@ -402,24 +397,24 @@ $(SAMP_DLL): $(CMD_OBJ) mem_if.obj $(CC) /D_WINDLL /D_USRDLL /c $(CFLAGS_SAM) ipmilanplus.c - $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LIBS_EX) + $(LINK) /DLL $(LFLAGS) /OUT:$(SAMP_DLL) /def:ipmiutillib.def $(CMD_OBJ) mem_if.obj $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) del ipmilanplus.obj ipmi_sample.exe: $(SAMP_LIB) ipmi_sample.obj - $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) /OUT:ipmi_sample.exe ipmi_sample.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) ipmi_sample2.exe: $(SAMP_LIB) ipmi_sample.c isensor.c ievents.c $(CC) /c $(CFLAGS_SAM) /DGET_SENSORS ipmi_sample.c $(CC) /c $(CFLAGS_SAM) isensor.c $(CC) /c $(CFLAGS_SAM) ievents.c - $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) - del isensor.obj ievents.obj + $(LINK) $(LFLAGS) /OUT:ipmi_sample2.exe ipmi_sample.obj isensor.obj ievents.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) + del isensor.obj ievents.obj ipmi_sample.obj ifruset.obj: ifruset.c $(CC) /c $(CFLAGS_SAM) ifruset.c ifruset.exe: $(SAMP_LIB) ifruset.obj ifru_picmg.obj - $(LINK) $(LFLAGS) /OUT:ifruset.exe ifruset.obj ifru_picmg.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) /OUT:ifruset.exe ifruset.obj ifru_picmg.obj $(SAMP_LIB) $(LIBS_PEF) $(LF_LANPLUS) $(LIBS_EX) ipmi_sample_evt.obj: ipmi_sample_evt.c $(HEADER) $(CC) /c $(CFLAGS_SAM) ipmi_sample_evt.c @@ -431,5 +426,5 @@ $(CC) /c /Foievents2.obj $(CFLAGS_SAM) /DSENSORS_OK ievents.c ipmi_sample_evt.exe: $(SAMP_LIB) ipmi_sample_evt.obj ievents2.obj isensor2.obj - $(LINK) $(LFLAGS) /OUT:ipmi_sample_evt.exe ipmi_sample_evt.obj ievents2.obj isensor2.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) + $(LINK) $(LFLAGS) $(LF_LANPLUS) /OUT:ipmi_sample_evt.exe ipmi_sample_evt.obj ievents2.obj isensor2.obj $(SAMP_LIB) $(LIBS_PEF) $(LIBS_EX) diff -Nru ipmiutil-2.9.9/util/ireset.c ipmiutil-3.0.0/util/ireset.c --- ipmiutil-2.9.9/util/ireset.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/ireset.c 2016-08-15 14:39:39.000000000 +0000 @@ -108,7 +108,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "ireset"; static uchar ipmi_maj; static uchar ipmi_min; diff -Nru ipmiutil-2.9.9/util/isel.c ipmiutil-3.0.0/util/isel.c --- ipmiutil-2.9.9/util/isel.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/isel.c 2016-08-15 14:39:39.000000000 +0000 @@ -162,7 +162,7 @@ #define RDATA_OFFSET 13 //byte offset to the record event data static char *progname = "isel"; -static char *progver = "2.99"; +static char *progver = "3.00"; #ifdef WIN32 #define IDXFILE "sel.idx" static char idxfile[80] = IDXFILE; @@ -651,14 +651,17 @@ char *s1; printf("%s: version %s\n",progname,progver); - while ((c = getopt(argc,argv,"a:b:cdef:h:l:m:np:rs:uwvx:T:V:J:EYF:P:N:U:R:Z:?")) != EOF) + while ((c = getopt(argc,argv,"a:b:cdef:h:i:l:m:np:rs:uwvxT:V:J:EYF:P:N:U:R:Z:?")) != EOF) switch(c) { case 'a': faddsel = 1; /*undocumented option, to prevent misuse*/ - addstr = optarg; /*text string, max 13 bytes*/ + addstr = optarg; /*text string, max 13 bytes, no date*/ break; - case 'h': faddsel = 1; /*undocumented option, to prevent misuse*/ + case 'h': faddsel = 3; /*undocumented option, to prevent misuse*/ addhex = optarg; /*string of 16 hex characters, no spaces*/ break; + case 'i': faddsel = 2; /*undocumented option, to prevent misuse*/ + addstr = optarg; /*text string, max 9 bytes, with date*/ + break; case 'b': fdecodebin = 1; rawfile = optarg; break; @@ -805,15 +808,25 @@ /* use this sparingly, only for hardware-related events. */ char buf[16]; int i, len = 0; - buf[0] = 0; - buf[1] = 0; + memset(&buf[0],0,16); if (addstr != NULL) { /*ASCII text string*/ + if (faddsel == 1) { /* -a, Add a custom SEL record */ buf[2] = 0xf1; /*use SEL type OEM 0xF1*/ len = strlen_(addstr); if (len > 13) len = 13; if (len <= 0) ret = LAN_ERR_TOO_SHORT; else memcpy(&buf[3],addstr,len); len += 3; + } + if (faddsel == 2) { /* -i, Add a custom SEL record with date*/ + buf[2] = RT_OEMIU; /*use SEL type OEM 0xDB*/ + memset(&buf[3],0,4); + len = strlen_(addstr); + if (len > 9) len = 9; + if (len <= 0) ret = LAN_ERR_TOO_SHORT; + else memcpy(&buf[7],addstr,len); + len += 7; + } } if (addhex != NULL) { /*string of hex characters, no spaces*/ len = strlen_(addhex); diff -Nru ipmiutil-2.9.9/util/iseltime.c ipmiutil-3.0.0/util/iseltime.c --- ipmiutil-2.9.9/util/iseltime.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/iseltime.c 2016-08-15 14:39:39.000000000 +0000 @@ -75,7 +75,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "iseltime"; static char fdebug = 0; static char fset = 0; diff -Nru ipmiutil-2.9.9/util/isensor.c ipmiutil-3.0.0/util/isensor.c --- ipmiutil-2.9.9/util/isensor.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/isensor.c 2016-08-15 14:39:39.000000000 +0000 @@ -175,6 +175,11 @@ return(1); return(0); } +int is_grantley(int vend, int prod) { + if ((vend == VENDOR_INTEL) && (prod == 0x0071)) + return(1); + return(0); +} int is_thurley(int vend, int prod) { if ((vend == VENDOR_INTEL) && ((prod >= 0x003A) && (prod <= 0x0040))) return(1); @@ -247,7 +252,7 @@ * Global Data ************************/ static char *progname = "isensor"; -static char *progver = "2.99"; +static char *progver = "3.00"; #ifdef WIN32 static char savefile[] = "%ipmiutildir%\\thresholds.cmd"; #else @@ -295,6 +300,7 @@ static double sensor_lo_f = 0; static int fmBMC = 0; static int fRomley = 0; +static int fGrantley = 0; static char chEol = '\n'; /* newline by default, space if option -w */ static uchar resid[2] = {0,0}; static uchar g_bus = PUBLIC_BUS; @@ -2231,7 +2237,7 @@ else istr = bitnum(b); /* ECC or other error */ break; case 0x0D: /* drive slot - usually HSC sens_ownid == 0xc0 */ - if (fRomley) { /* evtype==0x6f, has both status and presence */ + if (fRomley || fGrantley) { /* evtype==0x6f, has both status and presence */ if (reading & 0x02) istr = 12; /*Faulty*/ else if (reading & 0x80) istr = STR_REBUILDING; /*Rebuilding*/ else if (reading & 0x01) istr = 9; /*Present (OK)*/ @@ -3343,9 +3349,10 @@ pstr = "BMC"; fmBMC = 0; if (is_romley(vend_id,prod_id)) fRomley = 1; + if (is_grantley(vend_id,prod_id)) fGrantley = 1; if (prod_id == 0x003E || fRomley) /*Urbanna NSN2U,CG2100*/ set_max_kcs_loops(URNLOOPS); /*longer KCS timeout*/ - } else if ((vend_id == VENDOR_SUPERMICRO) + } else if ((vend_id == VENDOR_SUPERMICRO) || (vend_id == VENDOR_SUPERMICROX)) { set_max_kcs_loops(URNLOOPS); /*longer KCS timeout*/ } else { /* Other products */ diff -Nru ipmiutil-2.9.9/util/iserial.c ipmiutil-3.0.0/util/iserial.c --- ipmiutil-2.9.9/util/iserial.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/iserial.c 2016-08-15 14:39:39.000000000 +0000 @@ -155,7 +155,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "iserial"; static int vend_id = 0; static int prod_id = 0; diff -Nru ipmiutil-2.9.9/util/isol.c ipmiutil-3.0.0/util/isol.c --- ipmiutil-2.9.9/util/isol.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/isol.c 2016-08-15 14:39:39.000000000 +0000 @@ -165,7 +165,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "isol"; static char fdebug = 0; static char fpicmg = 0; diff -Nru ipmiutil-2.9.9/util/itsol.c ipmiutil-3.0.0/util/itsol.c --- ipmiutil-2.9.9/util/itsol.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/itsol.c 2016-08-15 14:39:39.000000000 +0000 @@ -98,7 +98,7 @@ extern int verbose; extern char fdebug; /*from ipmicmd.c*/ static char * progname = "itsol"; -static char * progver = "2.99"; +static char * progver = "3.00"; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; static uchar g_lun = BMC_LUN; diff -Nru ipmiutil-2.9.9/util/iwdt.c ipmiutil-3.0.0/util/iwdt.c --- ipmiutil-2.9.9/util/iwdt.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/iwdt.c 2016-08-15 14:39:39.000000000 +0000 @@ -100,7 +100,7 @@ /* * Global variables */ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "iwdt"; static char fdebug = 0; static char fdontlog = 0; diff -Nru ipmiutil-2.9.9/util/oem_dell.c ipmiutil-3.0.0/util/oem_dell.c --- ipmiutil-2.9.9/util/oem_dell.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/oem_dell.c 2016-08-15 14:39:39.000000000 +0000 @@ -132,7 +132,7 @@ "shared with failover all loms" }; -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "idelloem"; static int verbose = 0; static char fdebug = 0; diff -Nru ipmiutil-2.9.9/util/oem_intel.c ipmiutil-3.0.0/util/oem_intel.c --- ipmiutil-2.9.9/util/oem_intel.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/oem_intel.c 2016-08-15 14:39:39.000000000 +0000 @@ -370,41 +370,49 @@ else fHasEnc = 6; } break; - case 0x003E: /*S5520UR*/ - busid = PRIVATE_BUS_ID; - fbmctam = 1; /* CG2100 has bmc tam */ - fHasAlarms = 1; - fHasEnc = 8; /* CG2100 has 8 disks */ - fRelayBits = 1; + case 0x003E: /*S5520UR*/ + busid = PRIVATE_BUS_ID; + fbmctam = 1; /* CG2100 has bmc tam */ + fHasAlarms = 1; + fHasEnc = 8; /* CG2100 has 8 disks */ + fRelayBits = 1; + set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ + break; + case 0x005D: /* Copper Pass, CG2200*/ + busid = PRIVATE_BUS_ID; + fbmctam = 1; /* CG2200 has bmc tam */ + fHasAlarms = 1; + fRelayBits = 1; + fHasEnc = 6; /* 6 disks */ + set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ + break; + case 0x0071: /* CG2300*/ + busid = PRIVATE_BUS_ID; + fbmctam = 1; /* CG2300 has bmc tam */ + fHasAlarms = 1; + fRelayBits = 1; + fHasEnc = 6; /* 6 disks */ set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ - break; - case 0x005D: /* Copper Pass, CG2200*/ - busid = PRIVATE_BUS_ID; - fbmctam = 1; /* CG2200 has bmc tam */ - fHasAlarms = 1; - fRelayBits = 1; - fHasEnc = 6; /* 6 disks */ - set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ - break; - case 0x0051: /* Eagle Pass */ - busid = PRIVATE_BUS_ID; - fbmctam = 1; /* CG1200 has bmc tam */ - fHasAlarms = 1; - fRelayBits = 1; - fHasEnc = 4; /* 4 disks */ - set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ - break; - case 0x0048: /* "(S1200BT)" *BearTooth Pass*/ - case 0x004A: /* "(S2600CP)" *Canoe Pass*/ - case 0x0055: /* Iron Pass */ - case 0x005C: /* Lizard Head Pass */ - fHasEnc = 8; + break; + case 0x0051: /* Eagle Pass */ + busid = PRIVATE_BUS_ID; + fbmctam = 1; /* CG1200 has bmc tam */ + fHasAlarms = 1; + fRelayBits = 1; + fHasEnc = 4; /* 4 disks */ + set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ + break; + case 0x0048: /* "(S1200BT)" *BearTooth Pass*/ + case 0x004A: /* "(S2600CP)" *Canoe Pass*/ + case 0x0055: /* Iron Pass */ + case 0x005C: /* Lizard Head Pass */ + fHasEnc = 8; set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ - break; - default: - busid = PRIVATE_BUS_ID; - fHasEnc = 8; - break; + break; + default: + busid = PRIVATE_BUS_ID; + fHasEnc = 8; + break; } } if (fHasAlarms) f |= HAS_ALARMS_MASK; @@ -415,12 +423,21 @@ } if (fpicmg) f |= HAS_PICMG_MASK; if (fChesnee) f |= HAS_NSC_MASK; - if (is_romley(vend_id,prod_id)) { - if (prod_id == 0x005D) fHasEnc = 6; /*CG2200*/ - fHasEnc = 8; + if (is_romley(vend_id,prod_id)) + { + if (prod_id == 0x005D) fHasEnc = 6; /*CG2200*/ + fHasEnc = 8; set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ - f |= HAS_ROMLEY_MASK; + f |= HAS_ROMLEY_MASK; } + if (is_grantley(vend_id,prod_id)) + { + if (prod_id == 0x0071) fHasEnc = 6; /*CG2300*/ + fHasEnc = 8; + set_max_kcs_loops(URNLOOPS); /*longer for cmds (default 300)*/ + f |= HAS_ROMLEY_MASK; + } + *cap = f; return(busid); } @@ -927,6 +944,13 @@ { 0x005E, "Big Ridge"} /* Big Ridge */ }; +#define GIDS 3 /* Intel Grantley product ids: */ +struct { ushort id; char *desc; } grantleys[GIDS] = { + { 0x006F, "AXXRMM4" }, /* S2600, AXXRMM4LITE */ + { 0x0070, "S2600" }, /* S2600CO, KP, TP, */ + { 0x0071, "S2600CW" } /* CG2300, Kontron CG2300 */ +}; + #define TIDS 5 ushort thurley_ids[TIDS] = { /* Intel Thurley product ids: */ 0x003A, /* Snow Hill */ @@ -961,6 +985,36 @@ return(ret); } +int is_grantley(int vend, int prod) +{ + int ret = 0; + int i; + if (vend != VENDOR_INTEL) return(ret); + for (i = 0; i < GIDS; i++) + if ((ushort)prod == grantleys[i].id) { ret = 1; break; } + /* For now, assume all Intel prods > 0071 act same as Grantley */ + if (((ushort)prod > grantleys[GIDS-1].id) && ((ushort)prod < 0x00FF)) + ret = 1; + return(ret); +} + +int intel_grantley_desc(int vend, int prod, char **pdesc) +{ + int ret = -1; + int i; + if (vend != VENDOR_INTEL) return(ret); + if (pdesc == NULL) return(ret); + for (i = 0; i < GIDS; i++) { + if ((ushort)prod == grantleys[i].id) { + *pdesc = grantleys[i].desc; + ret = 0; + break; + } + } + if (ret == 0 && (**pdesc == '\0')) *pdesc = "S2600"; + return(ret); +} + int is_thurley(int vend, int prod) { int ret = 0; diff -Nru ipmiutil-2.9.9/util/oem_intel.h ipmiutil-3.0.0/util/oem_intel.h --- ipmiutil-2.9.9/util/oem_intel.h 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/oem_intel.h 2016-08-15 14:39:39.000000000 +0000 @@ -44,12 +44,13 @@ #define DISK_LED_WRITE 0x44 // only used for Chesnee mBMC #define DISK_LED_READ 0x45 // only used for Chesnee mBMC -#define HAS_ALARMS_MASK 0x0001 -#define HAS_BMCTAM_MASK 0x0002 -#define HAS_ENCL_MASK 0x0004 -#define HAS_PICMG_MASK 0x0008 -#define HAS_NSC_MASK 0x0010 -#define HAS_ROMLEY_MASK 0x0020 +#define HAS_ALARMS_MASK 0x0001 +#define HAS_BMCTAM_MASK 0x0002 +#define HAS_ENCL_MASK 0x0004 +#define HAS_PICMG_MASK 0x0008 +#define HAS_NSC_MASK 0x0010 +#define HAS_ROMLEY_MASK 0x0020 +#define HAS_GRANTLEY_MASK 0x0040 uchar get_nsc_diskleds(uchar busid); int set_nsc_diskleds(uchar val, uchar busid); @@ -75,5 +76,7 @@ int intel_romley_desc(int vend, int prod, char **pdesc); int get_power_restore_delay_intel(int *delay); int get_hsbp_version_intel(uchar *maj, uchar *min); +int is_grantley(int vend, int prod); +int intel_grantley_desc(int vend, int prod, char **pdesc); /* end oem_intel.h */ diff -Nru ipmiutil-2.9.9/util/oem_sun.c ipmiutil-3.0.0/util/oem_sun.c --- ipmiutil-2.9.9/util/oem_sun.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/oem_sun.c 2016-08-15 14:39:39.000000000 +0000 @@ -109,7 +109,7 @@ /* global variables */ static char * progname = "isunoem"; -static char * progver = "2.99"; +static char * progver = "3.00"; static char fdebug = 0; static uchar g_bus = PUBLIC_BUS; static uchar g_sa = BMC_SA; diff -Nru ipmiutil-2.9.9/util/oem_supermicro.c ipmiutil-3.0.0/util/oem_supermicro.c --- ipmiutil-2.9.9/util/oem_supermicro.c 2016-04-29 19:00:41.000000000 +0000 +++ ipmiutil-3.0.0/util/oem_supermicro.c 2016-08-15 14:39:39.000000000 +0000 @@ -67,7 +67,7 @@ void set_loglevel(int level); /*prototype */ extern char fsm_debug; /*mem_if.c*/ -static char * progver = "2.99"; +static char * progver = "3.00"; static char * progname = "ismcoem"; static int verbose = 0; static char fdebug = 0; @@ -401,24 +401,34 @@ //if (dbg) printf("supermicro %x sensor reading %x\n",stype,reading); rv = 0; switch(bval) { - case 0x0000: pstr = "00 Low"; break; - case 0x0001: pstr = "01 Medium"; break; - case 0x0002: pstr = "02 High"; break; - case 0x0004: pstr = "04 Overheat"; break; - case 0x0007: pstr = "07 Not Installed"; break; + case 0x0000: pstr = "00_Low"; break; + case 0x0001: pstr = "01_Medium"; break; + case 0x0002: pstr = "02_High"; break; + case 0x0004: pstr = "04_Overheat"; break; + case 0x0007: pstr = "07_Not Installed"; break; default: rv = -1; break; } break; case 0x08: /* Power Supply Status (Full/Discrete) Table 42-3 */ - rv = 0; - switch(bval) { - case 0x00: pstr = "00 Absent"; break; /*bit 0*/ - case 0x01: pstr = "01 Present"; break; /*bit 0*/ - case 0x02: pstr = "02 Failure"; break; /*bit 1*/ - case 0x04: pstr = "04 Predict Fail"; break; /*bit 2*/ - case 0x08: pstr = "08 Input Lost"; break; /*bit 3*/ - default: rv = -1; break; - } + rv = 0; + switch(bval) { + case 0x00: pstr = "00_Absent"; break; /*bit 0*/ + case 0x01: pstr = "01_Present"; break; /*bit 0*/ + case 0x02: pstr = "02_Failure"; break; /*bit 1*/ + case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/ + case 0x08: pstr = "08_Input Lost"; break; /*bit 3*/ + default: rv = -1; break; + } + break; + case 0x0D: /* HDD Status (Full/Discrete) Table 42-3 */ + rv = 0; + switch(bval) { + case 0x00: pstr = "00_Absent"; break; /*bit 0*/ + case 0x01: pstr = "01_Present"; break; /*bit 0*/ + case 0x02: pstr = "02_Failure"; break; /*bit 1*/ + case 0x04: pstr = "04_Predict Fail"; break; /*bit 2*/ + default: rv = -1; break; + } break; default: break; @@ -545,7 +555,7 @@ } rv = 0; break; - default: pstr = "CpuTemp Event"; break; + default: pstr = "CpuTemp Event"; rv = 0; break; } break; case 0xC2: /* CPLD Event */ @@ -557,7 +567,7 @@ else { pstr = "CPLD Event Asserted"; sevid = SEV_MIN; } rv = 0; break; - default: pstr = "CPLD Event"; break; + default: pstr = "CPLD Event"; rv = 0; break; } break; case 0xD0: /* BMC Event */ @@ -571,8 +581,20 @@ case 0x02: pstr = "BMC warm reset"; break; } } + rv = 0; + break; + case 0xC5: /* Observed Event: Storage, drive slot */ + /* usually OEM(c5) #52 - 6f [01 00 00] */ + pstr = "OEMC5: Storage/DriveSlot fault"; + sevid = SEV_MAJ; + rv = 0; + break; + case 0xC8: /* Observed Event: Temp/Cooling issue, reboots */ + /* usually OEM(c8) #ff - 6f [a0 ff ff] */ + pstr = "OEMC8: Temp/Cooling fault"; + sevid = SEV_MAJ; + rv = 0; break; - case 0xC8: /* Observed Event */ default: /*other sensor types*/ break; } @@ -584,12 +606,60 @@ return(rv); } +static int factory_defaults(int mode) +{ + int rv = -1; + int rlen; + uchar rdata[32]; + uchar idata[16]; + uchar cc; + /* + From SMC IPMICFG -fde session: + start_kcs_transaction - 18 01 (get_device_id) + start_kcs_transaction - 18 25 (watchdog get) + start_kcs_transaction - b0 00 00 (unknown, invalid) + start_kcs_transaction - 18 01 (get_device_id) + start_kcs_transaction - 18 37 (get_system_guid) + start_kcs_transaction - 18 01 (get_device_id) + start_kcs_transaction - c0 41 (reset_factory_defaults, -fde) + */ + + /* b0 00 00: cmd=00 netfn=2C */ + rlen = sizeof(rdata); + idata[0] = 0x00; + rv = ipmi_cmdraw(0x00, (0xb0 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN, + idata, 1, rdata, &rlen, &cc, fdebug); + if ((rv == 0) && (cc != 0)) rv = cc; + if (fdebug) printf("b0 00 returned %d\n",rv); + /* if (rv != 0) return(rv); */ + + if (mode == 2) { + rlen = sizeof(rdata); + rv = ipmi_cmdraw(0x37, (0x18 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN, + idata, 0, rdata, &rlen, &cc, fdebug); + if ((rv == 0) && (cc != 0)) rv = cc; + if (fdebug) printf("get_guid returned %d\n",rv); + if (rv != 0) return(rv); + } + + /* reset factory defaults cmd=0x41 netfn=0x30 (netfn/lun=0xC0) */ + rlen = sizeof(rdata); + rv = ipmi_cmdraw(0x41, (0xc0 >> 2), BMC_SA, PUBLIC_BUS, BMC_LUN, + idata, 0, rdata, &rlen, &cc, fdebug); + if ((rv == 0) && (cc != 0)) rv = cc; + if (fdebug) printf("factory default reset returned %d\n",rv); + if (rv != 0) return(rv); + + return(rv); +} + static void usage(void) { printf("Usage: %s [arg]\n",progname); printf(" intrusion = reset chassis intrusion\n"); printf(" bmcstatus [enable| disable] = get/set BMC status\n"); printf(" firmware = get extra firmware info\n"); + printf(" factory = reset to factory defaults\n"); printf(" lanport [dedicated| lan1| failover] = get/set IPMI LAN port\n"); printf(" powersupply = get PMBus PowerSupply status\n"); printf("These commands may not work on all SuperMicro systems\n"); @@ -628,7 +698,11 @@ printf("Getting SMC Firmare Information ...\n"); rv = oem_supermicro_get_firmware_str(msg, sizeof(msg)); if (rv == 0) printf("%s\n",msg); - } else if (strncmp(argv[0],"lanport",9) == 0) { + } else if (strncmp(argv[0],"factory",7) == 0) { + rv = factory_defaults(0); + if (rv == 0) printf("Reset firmware to factory defaults\n"); + else printf("Error %d resetting firmware to factory defaults\n",rv); + } else if (strncmp(argv[0],"lanport",7) == 0) { rv = oem_supermicro_get_lan_port(&val); if (rv == 0) { oem_supermicro_show_lan_port(val);